All published worksheets from http://sagenb.org
Image: ubuntu2004
Curve Properties
This worksheet will provide you with examples of code to:
- Understand Rolle's and the Mean Value Theorem. In particular, find points on a curve whose instantaneous slope matches the average slope.
- Find antiderivatives (indefinite integrals)
- Find and use differentials and linearizations (tangent lines)
- Use L'Hopitals rule
Using Rolle's Theorem and The Intermediate Value Theorem to show there is only one root.
Type in a function and a range of values (if , then put in two finite values). The code below will evaluate the function at the endpoints of your interval (hopefully showing one value is positive while the other is negative). Then it will compute the derivative and find where it is zero. If the derivative is never zero on the interval, then you immediately know that the function cannot have two zeros, otherwise Rolle's theorem would require that somewhere on the interval.
f | x^{3} + 3 \, x + 2 |
f at left endpoint | -1028 |
f at right endpoint | 1032 |
f' | 3 \, x^{2} + 3 = 3 \, x^{2} + 3 |
f'=0 | \text{[ x == -I, x == I ]} |
Graph |
The Mean Value Theorem
Recall that the mean value theorem guarantees the existence of a value in the interval such that The code below will help you find that value of .
f | x^{3} - 3 \, x |
f' | 3 \, x^{2} - 3 |
m=(f(b)-f(a))/(b-a) | 6 |
c such that f'(c)=m | \left[x = -\sqrt{3}, x = \sqrt{3}\right] |
Graph |
The code can be much shorter, but then the output is not as nice.
Antiderivatives
To compute antiderivatives (indefinite integrals), use the integrate command. Notice that the computer does not include the . You have to do that yourself.
Position from Velocity
If you know the velocity of an object, then all you have to do is integrate to find the position. If the initial position is at time , then you can replace each with and with to find the constant from integration.
a | -3 |
v | t^{2} + e^{t} |
s = integral of v | \frac{1}{3} \, t^{3} + C + e^{t} |
[t0,s0] | \left[0, 2\right] |
Equation to find C | 2 = C + 1 |
s | \frac{1}{3} \, t^{3} + e^{t} + 1 |
Position from Acceleration
If you know the acceleration at any time , as well as the velocity and position at a single time , then you can use the following code to find equations for the velocity and position. The table output at the end shows all the work involved.
a | t^{2} + e^{t} |
v = integral of a | \frac{1}{3} \, t^{3} + C + e^{t} |
[t0,v0] | \left[0, 3\right] |
Equation to find C | 3 = C + 1 |
v | \frac{1}{3} \, t^{3} + e^{t} + 2 |
s = integral of v | \frac{1}{12} \, t^{4} + D + 2 \, t + e^{t} |
[t0,s0] | \left[0, 2\right] |
Equations to find D | 2 = D + 1 |
s | \frac{1}{12} \, t^{4} + 2 \, t + e^{t} + 1 |
Differentials
The derivative gives us the slope of a tangent line. If you increase the value of a function from to , then how much does the value increase? The notation suggests that we can find a small change in by multiplying both sides by to obtain the differential Think of as a small change in . Think of as a small change in . The quantities and are called differentials. You can use differentials to estimate how much will change if changes by . The example below illustates how to do this. In high dimensional calculus, the differentials become vectors and the derivative becomes a matrix. This differential equation is the key equation needed to extend calculus to higher dimensions.
The picture below illustrates graphically how the differential comes from using the tangent line to approximate a function.
The code below illustrates numerically how is approximately the same as .
f | x^{2} |
f' | 2 \, x |
dy | 2 \, \mbox{dx} x |
dy evaluated at x and dx | 0.0200000000000000 |
f at the x value | 1 |
f at x+dx | 1.02010000000000 |
The actual change in y | 0.0201000000000000 |
The approximate change in y = dy | 0.0200000000000000 |
The linearization of is just another name for the tangent line. The code below compute the linearization of for any real number .
L'Hopital's Rule
If you cannot find a limit because it is of the form or , then L'Hopital's rule can often help. The idea is to take the derivative of the top and bottom separately, and then find the limit. If is exists, then the original limit equals the limit you found. You can repeat this as many times as needed, provide at each stage the limit is still of the form or . The example below illustrates this process for . Notice that after putting in zero in the top and bottom in both the original and after taking derivatives, you get 0/0 in both cases. Only after 2 derivatives do you get 1/2.
top | -\cos\left(x\right) + 1 | 0 | bottom | x^{2} | 0 |
top | \sin\left(x\right) | 0 | bottom | 2 \, x | 0 |
top | \cos\left(x\right) | 1 | bottom | 2 | 2 |
You can also use this rule when . In the example below, the second line gives , so you not take 2 derivatives.
top | \ln\left(x\right) | +\infty | bottom | x | +\infty |
top | \frac{1}{x} | 0 | bottom | 1 | 1 |
top | -\frac{1}{x^{2}} | 0 | bottom | 0 | 0 |