0

How can I structure this equation? I have tried doing this:

x:[0,4%pi];
solve(sin(x)=0.3,x);

and then solving for the equation but that didn't work because:

%pi is not an infix operator

Any suggestions and also how to solve the following in wxMaxima.

1

Francesco - FL
  • 603
  • 1
  • 4
  • 25
CoderCowMoo
  • 3
  • 1
  • 3

1 Answers1

2

For input, you have to show multiplication as 4*%pi (i.e., put in the asterisk). But aside from that, solve doesn't know how to restrict solutions to a range; you would solve for unspecified x and then filter the results.

If you only need a numerical solution, try: find_root(sin(x) = 0.3, x, 0, %pi/2) for example. Since there are multiple solutions of sin(x) = 0.3, for find_root, you have to restrict the range to contain one of them.

Robert Dodier
  • 16,905
  • 2
  • 31
  • 48