Mathematica is not just an “Expensive Calculator” (pt. 2): Calculus-Based “Calculators”

(part 1)

It would be a waste to make a Riemann sum finder and not make more calculus-related “calculators.”

The Equation of a Tangent Line

We can find the equation of a function’s various tangent lines using the function’s derivative. This tool allows the user to manipulate the point where the tangent line hits any given function. Here is a video demonstration (link) and the source code (link). This is how the code was constructed:

  1. use Plot[] to draw the original function and the general equation for a tangent line (I used “n” as a placeholder for the x-value)
  2. use Epilog to draw the point where the tangent line meets the graph
  3. PlotLabel (in the graph) will equation of the tangent line, so use a combination of <> and ToString[]
  4. display the contact point’s coordinates next to the point using Text[] (tip: to get the position of the text, take the original point and offset it by a small amount)
  5. optional: change the colors to make it look cool

tangent

Revolution of Solids

The volume of a solid found by rotating a graph around the x-axis, y-axis, or another line can be found using integrals. This small widget displays the graph of the function, its revolution, and the area. The degree of revolution can be manipulated and a function can be entered. Here is a demonstration (link) and here is the source code (link). The following steps show how the code was created:

  1. plot a function using RevolutionPlot3D[]
  2. change the degree of revolution to 0 to “a” (the letter “a” will be manipulated as the degree of revolution)
  3. calculate the area of the solid for the PlotLabel (tip: the area should be pi times the integral of the function squared, from 0 to “a”)
  4. make sure the code works, then replace the function with the letter “f” (you should be able to enter the function, but make sure that there is an initial function)
  5. use Manipulate[] to change the values of “a” and “f” – make sure that “a” starts from a number close to but not equal to zero

revolution1.png

freetime

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s