There may be other types of questions, but being able to do these should mean you will do really well on this test.
We assume you have run the following code:
using MTH229
ANS: The slope of the secant line is just the slope between the points $(a,f(a))$ and $(b, f(b))$:
f(x) = sin(x) a, b= -pi/3, pi/3 m = (f(b) - f(a)) / (b - a)
ANS: The tangent line slope is given by the derivative. Here we use f'
:
f(x) = sin(x) a, b= -pi/3, pi/3 f'(a), f'(b)
(0.5000000000000001,0.5000000000000001)
ANS: We have the approximate forward derivative is the slope of a secant line approximation to the tangent line. Rather than write with a
and b
, we use c
and c+h
:
f(x) = sin(x) c, h = pi/3, 1e-6 m = (f(c+h) - f(c)) / h
sin'(pi/3)
?ANS: we subtract to see:
m - f'(c)
(We expect it to be around the size of h
or 1e-6
. Is it?)
Find the rate of change of height at time $t=1$. Find the rate of change of height at the instant the arrow strikes the grount.
ANS: We have the rate of change is just y'(t)
, so we simply need to find the right values for t
:
y(t) = -16t^2 + 25t + 5 y'(1)
As for the last question, we have to solve for when $y(t) = 0$, then plug this t in. Clearly at $y(0) > 0$ and $y(10) < 0$, so $[0,10]$ is a bracketing interval:
t0 = fzero(y, 0, 10) y'(t0)
fzero
find when $V'(t) = a$ between $0$ and $100$.V(t) = 10 * (1 - t/100)^2 t0, t1 = 0, 100 avg = (V(t1) - V(t0)) / (t1 - t0)
To find the time, we need to create a new equation $V'(T) - avg = 0$:
W(t) = V'(t) - avg as = fzeros(W, 0, 100)
1-element Array{Float64,1}: 50.0
We can plot the function and it's tangent lines:
p = plot(V, 0, 100) for a in as plot!(p, tangent(V, a), 0, 100) end p
f(x) = x * airy(x)
over the interval $[-3, 3]$. From your graph, answer: on what intervals is $f(x)$ positive? increasing? concave up? (Use plotif
here.)We use plotif
to visualize. We use f
then f'
then f''
:
For positive:
f(x) = x * airy(x) plotif(f, f, -3, 3) # [3, -2.3] and [0, 3]
For increasing
plotif(f, f', -3, 3) # [-1.5, 0.9]
Finally, for concave up:
plotif(f, f'', -3, 3) # [-2.6, -0.7] and [1.7, 3]
fzero
or fzeros
here.)ANS: The critical points answer $f'(x) = 0$. (Why are there no points where $f'(x)$ is not defined?)
f(x) = 2x - x^2 + 6 - x^3/9 plot(f, -15, 15)
A cubic polynomial has at most two critical points, we see then must be within $[-10,10]$, so we look there:
cps = fzeros(f', -10, 10)
2-element Array{Float64,1}: -6.87298 0.872983
We graph to see that $f'$ changes sign at each of these values:
plot(f'(x), minimum(cps) - 1, maximum(cps) + 1)
UndefVarError(:x)
The value of $f''$ at each is given by:
map(f'', cps)
2-element Array{Float64,1}: 2.58199 -2.58199
We see positive, negative in agreement with a relative minimum and relative maximum.
ANS: We carefully plot near 0 to get a glimpse:
f(x) = 1/x + x plot(f, 1/10, 10)
Looks like just one critical point near 1.0:
cps = fzeros(f', 1/10, 10)
1-element Array{Float64,1}: 1.0
And the values are:
map(f'', cps)
1-element Array{Float64,1}: 2.0
That this is positive means there is a global minimum at the critical point, as can be seen from the graph.
ANS: we enter f
, then get to work:
f(x) = 2x - x^2/6 - x^3/9
f (generic function with 1 method)
ips = fzeros(f'', -25, 25)
1-element Array{Float64,1}: -0.5
Just one which is consistent with a third-degree polynomial.
ANS:
We have
f(x) = x^3 - 3x + 5 plot(f, -10, 10)
All the excitement is within this interval, so we use fzeros
to find the critical points:
cps = fzeros(f', -10, 10)
2-element Array{Float64,1}: -1.0 1.0
There are two, we can see that the function changes sign plus to minus at $-1$ and minus to plus at $1$:
plot(f', -1.5, 1.5)
So $f$ will have a relative max at $-1$ and relative min at $1$.
ANS:
We plot over $[-10,10]$ and see that any relative extrema will be in this interval:
f(x) = x^2 * exp(-x/3) plot(f, -10, 10)
To find the critical points we have:
cps = fzeros(f', -10, 10)
2-element Array{Float64,1}: 0.0 6.0
Plotting f'
over $[-1, 7]$ allows us to see the signs:
plot(f', -1, 7)
So at the critical point $0$ we have $f'(x)$ changing sign minus to plus, so $f(x)$ has a relative minimum. At the critical point $x=6$ the opposite occurs and we have a relative maxumimum.
f(x) = (x^2)^(1/3)*(2-x)
. Make a plot over $[-4,4]$ and identify graphically any critical points. Are all the critical points found by fzeros(f, -4, 4)
? Can the second derivative test classify all the critical points? Can the first derivative test classify all the critical points?ANS:
f(x) = (x^2)^(1/3) * (2-x) plot(f, -4, 4)
We see a "cusp" at $x=0$ where the derivative will be undefined, but we might not see that with Julia
, so heads up. (Recall, fzero
for bisection, which fzeros
is built upon, will not only find places where $f(x)=0$, but really finds places where $f(x)$ "crosses" $0$ either continuously, or with a jump, as will be the case when fzeros
is applied to f'
and there is a cusp.)
Let's see:
cps = fzeros(f', -1, 3)
2-element Array{Float64,1}: 0.0 0.8
We do see it.
Can we use the second derivative test? Well no, the critical point at $0$ is where the first derivative fails to exist, so clearly the second derivative can't either. But we can tell that the first derivative changes sign:
plot(f', -1, 3)
The graph – hard to read – shows f'(x)
goes from minus to plus at $0$ so the first derivative tests informs us there is a relative minimum - as we can see. At $x=0.8$ we go from plus to minus, so we see a relative max.
Don't be fooled. There wasn't a question where you are given $f'(x)$ (or even $f''(x)$) and you have to figure out facts about $f(x)$. Don't think there won't be on the test! For starters, suppose $f'(x)$ is given by $\sin(x)/x$. What can you say about $f(x)$? Where is positive? increasing? concave up? Does it have relative minima? maxima? ...
And oh, yeah, I forgot to put on a question involving tangent(f,c)
. Expect one. For example, when does the tangent line cross 0?