AUTHOR PAGE
samb
Sam Blake
Blog Posts from this author:
August 3, 2011–Sam Blake 0

In my last blog post on plotting functionality in Wolfram|Alpha, we looked at 2D and 3D Cartesian plotting. In this post, we will look at 2D polar and parametric plotting.

For those of you unfamiliar with polar plots, a point on a plane in polar coordinates is located by determining an angle θ and a radius r. For example, the Cartesian point (x, y) = (1, 1) has the polar coordinates (r, θ) = (√2,π/4). The following diagram illustrates the relationship between Cartesian and polar plots.

Relationship between Cartesian and polar plots

To generate a polar plot, we need to specify a function that, given an angle θ, returns a radius r that is a function r(θ). Making a polar plot in Wolfram|Alpha is very easy; for example, we can plot Archimedes’ spiral.

plot r = theta

Or we can get a little fancier and plot a polar rose with eight petals.

polar plot 2cos(4*θ)

Want to know how to graph this in Mathematica? We can easily extract the Mathematica code for this plot right from Wolfram|Alpha. By clicking the dog-ear in the bottom left of the images and then “Copyable plaintext”, you can see the Mathematica code used to generate the plots.

PolarPlot[2cos4θ],{θ, -pi, pi}]

Polar rose with 8 petals

Here are some other awesome polar plots:

The plot of a lemniscate:

Lemniscate

And a lituus:

Lituus

And a cochleoid:

Cochleoid

Wolfram|Alpha can also handle more complicated inputs, like r(θ) = exp(cos(θ) - 2 cos(4θ) + sin (θ/12)^5:

plot r(θ) = exp(cos(θ)) - 2cos(4θ) + sin(θ/12)^5

Now that you have seen some great examples of polar plots, let’s move on to parametric plots.

What is the difference between a polar and parametric plot? Parametric coordinates specify points (x,y) in 2D with two functions, (x,y) = (f(t), g(t)) for a parameter t. Here are some examples of 2D parametric plots to try in Wolfram|Alpha.

Try to make a parametric plot of (x(t), y(t)) = (1-t,t2).

parametric plot (1-t, t^2)

We can easily see that this is the same as the Cartesian equation y = 1 - 2x + x2. (x(t) = 1 - tt = 1 - x(t) so y(x(t)) = (1 - x)2 = 1 - 2x + x2)

In the above example, we didn’t even need to enter a plot range; Wolfram|Alpha picked the plot range that best suits the graph. Of course, it’s possible to specify a range for the parameter, in this case we plot (x(t), y(t)) = (sin(t), sin(3t)) for t from 0 to 100.

parametric plot (sint, sin(sqrt(3)t)) for t from 0 to 100

Now let’s look at some other cool plots that Wolfram|Alpha can create.

How about the parametric plot of the astroid:

Astroid

Or a similar plot, the deltoid:

Deltoid

If we had just said “plot” instead of “parametric plot”, then Wolfram|Alpha would have returned a Cartesian plot of 4cos(φ) + 2cos(2φ) and 4sin(φ) + 2sin(2φ), as well as a parametric plot of the deltoid.

Want some more examples? Check out these classic examples of parametric plots (the tractrix, fish curve, Tschirnhausen cubic, and Plateau curves, respectively):

In the previous plotting post, you had the opportunity to learn about 2D Cartesian plotting in Wolfram|Alpha, and now you are equipped with the ability to make 2D polar and parametric plots as well. Luckily, Wolfram|Alpha doesn’t stop there; start playing with some 3D graphs and it will not let you down!

May 17, 2011–Sam Blake 18

Plotting functions in the Cartesian plane is such a simple task with Wolfram|Alpha: just enter the function you are looking to graph, and within seconds you will have a beautiful result. If you are feeling daring, enter a multivariate function, and the result will be a 3D Cartesian graph. Wolfram|Alpha is certainly not limited to Cartesian plotting; we have the functionality to make number lines, 2D and 3D polar plots, 2D and 3D parametric plots, 2D and 3D contour plots, implicit plots, log plots, log-linear plots, matrix plots, surface of revolution plots, region plots, list plots, pie charts, histograms, and more. Furthermore, in Wolfram|Alpha we can generate specialized plots for illustrating asymptotes, cusps, maxima, minima, inflection points, saddle points, solutions of ordinary differential equations, poles, eigenvalues, series expansions, definite integrals, 2D inequalities, interpolating polynomials, least-squares best fits, and more. Let’s take a look at the plotting functionality in Wolfram|Alpha, some of which is newly improved!

We will start simple with 2D Cartesian plots.

Here we plot sin(√7x)+19cos(x) for x between -20 and 20.

Plot sinsqrt7x+19cosx between -20 and 20
More »

April 25, 2011–Sam Blake 8

Wolfram|Alpha is written in Mathematica, which as its name suggests is a fantastic system for doing mathematics. Strong algorithms for algebraic simplification have always been a central feature of computer algebra systems, so it should come as no surprise to know that Mathematica excels at simplifying algebraic expressions. The main two commands for simplifying an expression in Mathematica are Simplify and FullSimplify. There are also many specific commands for expressing an algebraic expression in some form. For example, if you want to expand a product of linear polynomials, Expand is the appropriate function.

The good news is that everyone has access to the power of Mathematica’s simplification and algebraic manipulation commands in Wolfram|Alpha. We will now outline some of these features in Wolfram|Alpha, starting with the expression:

Mathematical expression

and we will use Wolfram|Alpha to break it down to something significantly much simpler.
More »