Marco Repetto
Marco Repetto

Reputation: 336

Solve() and Assume() in Maxima

I'm trying to solve a trigonometric function assuming positive values of the independent variable. However seems like Maxima does not take into account such assumption for the solve routine.

assume(t >0);
solve(sin(t) = 0);

The expected result:

[t=%pi]

What I get:

[t=0]

Upvotes: 2

Views: 2532

Answers (1)

AlQuemist
AlQuemist

Reputation: 1304

One could use to_poly_solve package; see the docs.

load(to_poly_solve);
to_poly_solve(sin(t), t);

which yields

%union([t = %pi %z0])

which is the result you expect.

Upvotes: 1

Related Questions