
MathStudio
Symbolic computation, 3D plotting, and scripting for scientists and engineers.
Build a calculation one entry at a time. Start with an expression, see its exact answer, then use the same notebook to graph a function, fit a model, or write a script.
Build a periodic signal from sine waves. The orange line shows the square wave and the red line shows its Fourier approximation.
As you add higher harmonics, the flat stretches sharpen and the ripples crowd closer to each jump.
Slider(n,1,30,1,6)
Plot(SquareWave(x),color=orange)
Plot(FourierSeries([[-1,-@pi..0],[1,0..@pi]],x,n),color=red)
Slider(n,1,30,1,6)
Plot(2@pi*SawToothWave(x-@pi)-@pi,color=cyan)
Plot(FourierTrigSeries(x,x,n),color=blue)
Raise the series order, then compare the approximation with a sawtooth wave.
Split a light wave into two perpendicular components. The cyan and yellow curves show how each component varies along the direction of travel.
The magenta curve traces the tip of the electric field at one position. Try 0° for a straight line and 90° for an ellipse.
Slider(d, 0, 360, 5, 45)
a = d*@pi/180
ParametricPlot3D(2*cos(u), u, 0, u=[0,4@pi,200], color=cyan)
ParametricPlot3D(0, u, 2.5*cos(u+a), u=[0,4@pi,200], color=yellow)
ParametricPlot3D(2*cos(u), 0, 2.5*cos(u+a), u=[0,2@pi,200], color=magenta)
for i in 0..80
s = 4@pi*i/80
ParametricPlot3D(u*2*cos(s), s, 0, u=[0,1,2], color=cyan)
ParametricPlot3D(0, s, u*2.5*cos(s+a), u=[0,1,2], color=yellow)
end
Plot3D(axis=0, background=black)
Move the phase slider to change where the two waves reach their peaks.
Lift the first of five suspended balls and let it swing. When it reaches the row, the ball at the far end swings out.
The script uses the string length and release angle to calculate each swing and draws the frame, strings, and balls with parametric plots.
numerical
Slider(A, 5, 60, 1, 45)
z0 = A*@pi/180 // Release angle in radians
l = 9.7 // String length in centimeters
r = 1.3 // Ball radius in centimeters
d1 = 9 // Bottom horizontal bars length
d2 = 9 // Vertical bars length
d3 = 11 // Upper horizontal bars length
R = 0.3 // Radius of the structure
p = asin(((d1+2)/2)/l) // Angle between strings and zy-plane
a = (1+R*cos(v))*cos(u)
b = (1+R*cos(v))*sin(u)
c = R*sin(v)
d = R*sin(u)
e = R*cos(u)
// Structure
ParametricPlot3D(a-d1/2, c-1-d3/2, b+1+R, v=[0, 2@pi], u=[@pi, 3*@pi/2], lines=0, color=gray)
ParametricPlot3D(v-d1/2, e-1-d3/2, d+R, u=[0, 2@pi, 30], v=[0, d1], lines=0, color=gray)
ParametricPlot3D(-a+d1/2, c-1-d3/2, b+1+R, v=[0, 2@pi], u=[@pi, 3*@pi/2], lines=0, color=gray)
ParametricPlot3D(d+1+d1/2, e-1-d3/2, v+1+R, u=[0, 2@pi, 30], v=[0, d2], lines=0, color=gray)
ParametricPlot3D(c+1+d1/2, a-d3/2, b+d2+1+R, v=[0, 2@pi], u=[@pi/2, @pi], lines=0, color=gray)
ParametricPlot3D(e+1+d1/2, v-d3/2, d+d2+2+R, u=[0, 2@pi, 30], v=[0, d3], lines=0, color=gray)
ParametricPlot3D(c+1+d1/2, -a+d3/2, b+d2+1+R, v=[0, 2@pi], u=[@pi/2, @pi], lines=0, color=gray)
ParametricPlot3D(d+1+d1/2, e+d3/2+1, v+1+R, u=[0, 2@pi, 30], v=[0, d2], lines=0, color=gray)
ParametricPlot3D(-a+d1/2, c+1+d3/2, b+1+R, v=[0, 2@pi], u=[@pi, 3*@pi/2], lines=0, color=gray)
ParametricPlot3D(v-d1/2, e+1+d3/2, d+R, u=[0, 2@pi, 30], v=[0, d1], lines=0, color=gray)
ParametricPlot3D(a-d1/2, c+1+d3/2, b+1+R, v=[0, 2@pi], u=[@pi, 3*@pi/2], lines=0, color=gray)
ParametricPlot3D(d-1-d1/2, e+1+d3/2, v+1+R, u=[0, 2@pi, 30], v=[0, d2], lines=0, color=gray)
ParametricPlot3D(c-1-d1/2, -a+d3/2, b+d2+1+R, v=[0, 2@pi], u=[@pi/2, @pi], lines=0, color=gray)
ParametricPlot3D(e-1-d1/2, v-d3/2, d+d2+2+R, u=[0, 2@pi, 30], v=[0, d3], lines=0, color=gray)
ParametricPlot3D(c-1-d1/2, a-d3/2, b+d2+1+R, v=[0, 2@pi], u=[@pi/2, @pi], lines=0, color=gray)
ParametricPlot3D(d-1-d1/2, e-1-d3/2, v+1+R, u=[0, 2@pi, 30], v=[0, d2], lines=0, color=gray)
// Balls and ropes static
ParametricPlot3D(sin(p)*u, -2*r, d2+2-l*cos(p)+cos(p)*u, u=[0, l], color=brown)
ParametricPlot3D(-sin(p)*u, -2*r, d2+2-l*cos(p)+cos(p)*u, u=[0, l], color=brown)
ParametricPlot3D(sin(p)*u, 0, d2+2-l*cos(p)+cos(p)*u, u=[0, l], color=brown)
ParametricPlot3D(-sin(p)*u, 0, d2+2-l*cos(p)+cos(p)*u, u=[0, l], color=brown)
ParametricPlot3D(sin(p)*u, 2*r, d2+2-l*cos(p)+cos(p)*u, u=[0, l], color=brown)
ParametricPlot3D(-sin(p)*u, 2*r, d2+2-l*cos(p)+cos(p)*u, u=[0, l], color=brown)
ParametricPlot3D(r*sin(u)*cos(v), -2*r+r*cos(u)cos(v), d2+2+r*sin(v)-l*cos(p), u=[0, 2@pi, 30], v=[0, 2@pi, 30], lines=0, color=red)
ParametricPlot3D(r*sin(u)*cos(v), r*cos(u)cos(v), d2+2+r*sin(v)-l*cos(p), u=[0, 2@pi, 30], v=[0, 2@pi, 30], lines=0, color=red)
ParametricPlot3D(r*sin(u)*cos(v), 2*r+r*cos(u)cos(v), d2+2+r*sin(v)-l*cos(p), u=[0, 2@pi, 30], v=[0, 2@pi, 30], lines=0, color=red)
// Balls and ropes on motion
Animate(t, 0..100 -> 0.03)
z = (z0+z0^3/192+z0^5*23/61440)*cos(1/4*sqrt(9.80665/(l/100))*(1+sqrt(cos(z0/2)))^2*t)-(z0^3/192+z0^5*23/61440)*cos(3*1/4*sqrt(9.80665/(l/100))*(1+sqrt(cos(z0/2)))^2*t) // Angle motion approximate solution
if sin(z) > 0
ParametricPlot3D(-(2+d1)/2*u, -4*r-l*sin(z)*cos(p)+(l*sin(z)*cos(p))*u, 2+d2-l*cos(z)*cos(p)+(l*cos(z)*cos(p))*u, u=[0, 1], color=brown)
ParametricPlot3D((2+d1)/2*u, -4*r-l*sin(z)*cos(p)+(l*sin(z)*cos(p))*u, 2+d2-l*cos(z)*cos(p)+(l*cos(z)*cos(p))*u, u=[0, 1], color=brown)
ParametricPlot3D(r*sin(u)*cos(v), -4*r-l*sin(z)*cos(p)+r*cos(u)cos(v), 2+d2-l*cos(z)*cos(p)+r*sin(v), u=[0, 2@pi, 30], v=[0, 2@pi, 30], lines=0, color=red)
ParametricPlot3D(sin(p)*u, 4*r, 2+d2-l*cos(p)+cos(p)*u, u=[0, l], color=brown)
ParametricPlot3D(-sin(p)*u, 4*r, 2+d2-l*cos(p)+cos(p)*u, u=[0, l], color=brown)
ParametricPlot3D(r*sin(u)*cos(v), 4*r+r*cos(u)cos(v), 2+d2+r*sin(v)-l*cos(p), u=[0, 2@pi, 30], v=[0, 2@pi, 30], lines=0, color=red)
else
ParametricPlot3D(-(2+d1)/2*u, 4*r-l*sin(z)*cos(p)+(l*sin(z)*cos(p))*u, 2+d2-l*cos(z)*cos(p)+(l*cos(z)*cos(p))*u, u=[0, 1], color=brown)
ParametricPlot3D((2+d1)/2*u, 4*r-l*sin(z)*cos(p)+(l*sin(z)*cos(p))*u, 2+d2-l*cos(z)*cos(p)+(l*cos(z)*cos(p))*u, u=[0, 1], color=brown)
ParametricPlot3D(r*sin(u)*cos(v), 4*r-l*sin(z)*cos(p)+r*cos(u)cos(v), 2+d2-l*cos(z)*cos(p)+r*sin(v), u=[0, 2@pi, 30], v=[0, 2@pi, 30], lines=0, color=red)
ParametricPlot3D(sin(p)*u, -4*r, 2+d2-l*cos(p)+cos(p)*u, u=[0, l], color=brown)
ParametricPlot3D(-sin(p)*u, -4*r, 2+d2-l*cos(p)+cos(p)*u, u=[0, l], color=brown)
ParametricPlot3D(r*sin(u)*cos(v), -4*r+r*cos(u)cos(v), 2+d2+r*sin(v)-l*cos(p), u=[0, 2@pi, 30], v=[0, 2@pi, 30], lines=0, color=red)
end
Plot3D(width=800, height=500, axis=0)
Choose a release angle and press Release. Reset to lift the first ball again.
MathStudio’s computer algebra system typesets exact answers. Factor a polynomial, differentiate a product, or find an integral. Each result appears directly below the expression you entered.
At each point on the parabola, the derivative gives the slope of the orange tangent line.
Slider(a, -2, 2, 0.1, 1)
m = Eval(D(x^2, x), x, a)
Plot(x^2, color=blue)
Plot(a^2+m*(x-a), color=orange)
ListPlot([a], [a^2], color=magenta)Move the point along the parabola to see how its slope changes.
From basic calculations to college calculus, MathStudio gives you hundreds of scientific functions. Keep a square root in exact form, evaluate a factorial, or switch to a decimal approximation.
A factorial counts the ways to arrange distinct objects. Set n to 6 to see why six objects have 720 possible orders.
Slider(n, 0, 10, 1, 6)
n!Choose how many distinct objects to arrange.
Plot several functions on the same axes to see where they agree and where they diverge. Trace a curve, draw a vector field, or compare a periodic signal with its Fourier approximation.
One coordinate completes seven oscillations while the other completes eight. Together they trace a closed Lissajous curve.
Slider(p, 0, 100, 1, 65)
t = 2@pi*p/100
if p > 0
ParametricPlot(sin(7u), sin(8u), u=[0,t,600], color=green)
end
ListPlot([sin(7t)], [sin(8t)], color=magenta)Follow a point whose horizontal and vertical coordinates oscillate at different rates.
x = sin(7u), y = sin(8u)Plot a function of two variables or define a surface with parametric equations. Drag to rotate the graph and inspect its peaks, valleys, and folds from a different angle.
This surface depends only on distance from the origin. Look from above to see concentric rings, then turn it sideways to see the cosine profile.
r = sqrt(x^2+y^2)
Plot3D(cos(r), x=[-8,8], y=[-8,8])Drag the surface or use the arrow keys to change the viewing angle.
Plot lists of data with built-in regression analysis. Give MathStudio your measured x and y values to draw a scatter plot and fit a line. Compare it with a quadratic or exponential model when the data curve.
Eight measurements stay fixed. Changing the ninth shows how much a single observation can tilt the fitted line.
Slider(h, 1, 12, 0.1, 6)
xs = [1,4,9,5,7,5,4,2,9]
ys = [3,4,5,7,8,10,4,7,h]
ListPlot(xs, ys, regression=linear, color=blue)
ListPlot([9], [h], color=magenta)Drag the purple point or adjust its height to recalculate the best-fit line.
Develop your ideas with MathStudio’s expressive scripting language. Use variables, loops, and conditionals to turn a calculation into a program you can run again.
Follow a loop that adds the integers from 1 to 10. Each press includes one more number in the sum.
Button(n, 0:10, 0)
total = 0
for k in 1..10
if k <= n
total += k
end
end
totalRun one pass of the loop at a time and watch the total accumulate.
Create controls to interactively change the values of variables in plots and expressions. A slider lets you adjust a parameter and see its effect without editing the equation.
View the electric field end-on. With no phase difference the field traces a line. At a quarter turn it traces an ellipse.
Slider(d, 0, 360, 1.8, 45)
a = d*@pi/180
ParametricPlot(2cos(u), 2.5cos(u+a), u=[0,2@pi,240], color=magenta)
ParametricPlot(2u, 2.5u*cos(a), u=[0,1], color=blue)
ListPlot([2], [2.5cos(a)], color=blue)Shift the phase between the two waves to change the path of the electric field.
From unit conversions to compound unit arithmetic, MathStudio keeps track of units as you calculate. Add feet to inches, convert Fahrenheit to Celsius, or multiply speed by time to find distance.
Temperature scales have different zero points. Try −40 °C to find a temperature where the two readings agree.
Slider(c, -40, 100, 1, 40)
(c*@C) -> @FMove the Celsius slider to see the equivalent temperature in Fahrenheit.
Explore plots from MathStudio’s shared scripts. Select a plot to enlarge it and read the code that drew it.
Look up a function, follow the manual, or open a shared script.

Symbolic computation, 3D plotting, and scripting for scientists and engineers.

A graphing calculator for students and teachers, from algebra through calculus.

Ask a question in plain language and let MathStudio work out the answer.