2

I am trying to graph a trig function in WolframAlpha. I want the x axis to show radians. It will do this for a basic function, such as $y=\sin x$, but for many functions it will just label the x axis from -10 to 10. I have googled this and this is the best I can come up with:

plot sin (x/2 -pi/16) ,Ticks ->{{-pi, -pi/2, 0, pi/2, pi, 3pi/2, 2pi, 5pi/2},{-1,1}}

It doesn't work, WolframAlpha just plots the function from -10 to 10 on the x axis.

mikoyan
  • 1,135

2 Answers2

6

For more sophisticated plots WolframAlpha is not the best option, I only use it for a first idea of the function. Never the less using Mathematica Syntax might help.

At least the PlotRange you can chose via

Plot[ Sin [x/2 - Pi/16], {x, -Pi, 5 Pi/2}]

which gives you this

If you have Mathematica you have a lot more options for Plots, using the command

Plot[ Sin [x/2 - Pi/16], {x, -Pi, 5 Pi/2}, 
    Ticks -> {{-Pi, -Pi/2, 0, Pi/2, Pi, 3 Pi/2, 2 Pi, 5 Pi/2}, {-1, 1}}]

gives you

enter image description here

0

I know this is a little tedious, but in the free version of Wolfram Alpha, you can still have it give you results at any point even if you can't do the ticks.

In particular, before the graph it will still nicely list all the global maxima and minima with the max{} and min{} functions. For example: max { sin(x) } from x=0 to 8 pi will list out where the global maxima is. The min function works identically. Here, the result is given in radians, even though the axis unit ticks are not.