
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

APPM 2450 - Calculus 3 Computer Lab Lab Exercise 2
APPM 2450 Calculus 3 Computer Lab Lab Exercise 2
Create a Mathematica notebook that does all of the following. Feel free to ask your neighbor or your lab instructor for help if you get stuck. Items with a à are required, items with a P are optional.
à Define the functions f (x) = x^3 + x^2 + x + 1 and g(x) = x^3 + x^2 + x + 1 − sin(x). Remember sin needs a capital S, and square brackets.
à Get help for the command Plot.
à Plot f (x) with x running from −3 to 3.
à Plot f (x) with x running from −3 to 3 and y from −4 to 4. Use the PlotRange option, PlotRange->{-4,4}.
à Plot f (x) as above, but add the option PlotStyle->RGBColor[1,0,0] to color it red.
à Store the above plot as a p1, by either doing p1=%, or p1=Plot[......]
à Plot g(x) for the same values of x and y as you did for f (x) above. Make this plot blue (PlotStyle->RGBColor[0,0,1]) and store the result as p2.
à Use the command Show[p1,p2] to display both functions on the same graph. Label your axes, look up how if you need to.
à Define h(x) = tan(x).
à Make a plot of h(x), for −π ≤ x ≤ π. Remember that in Mathematica π is Pi.
à Now plot h(x) as above, but use the option PlotRange->All. Does this plot look good? If not, fix it in a way similar to the examples with f (x) above.
à Define k(x) as the derivative of h(x). To do this, do something like k[x_]=D[...].
à Make a nice looking plot of k(x).
P Pick your favorite equation, or if you don’t have one, use y = (^) x (^2) −^125. Graph your chosen equation and its first two derivatives on the same set of axes. Each should have its own color.