Sample questions for test 2
There may be other types of questions, but being able to do these should mean you will do well on this test.
using MTH229
Zeros
- The bisection method is used to solve $f(x) = 0$ with $f(x) = x^2-2$. The interval $[1,2]$ is the intial interval. What interval is found after the first step? The second? The third? Use rational numbers.
- For $f(x) = \sin(x)$, is $[\pi/4, 3\pi/4]$ a bracketing interval?
- Use
fzeros
to find the real roots of the polynomial $f(x) = x^5 - x + 1$.
f(x) = x^5 - x + 1
fzeros(f)
1-element Array{Real,1}:
-1.1673
There is just one, as this graph suggests
plot(f, -2, 2)
plot!(zero, -2, 2)
- For
f
above, the commands fzeros(f)
and fzeros(f, -2, 2)
will use different algorithms. Do they produce the same answer?
- For the function $f(x) = x^3 - 9x^2 +26x - 24$ over the interval $[0,6]$ there are a few roots. For each, find a bracketing interval,
[a,b]
, and use fzero(f, [a,ealb])
to find the roots.
f(x) = x^3 - 9x^2 + 26x - 24
plot(f, 0,6)
Is [0,6]
a bracketing interval?
What is the answer?
- Use
fzero
to find a solution to $\exp(x) = x^4$ in $[5, 15]$.
- Use
fzero
to find when the lines $y=100x + 200$ and $y= 50x + 300$ cross? (The $x$ value)
- Use
fzeros
to show numerically that $e^{x^2} + x \geq e^x$. Why can't you use fzero
for this task?
- Use
fzeros
to find how many zeros there are for $f(x) = \sin(20\pi\cdot x)$ over $[0,1]$.
(Is 1 counted in your answer?)
Limits
- Graphically identify the following limits or say why they do not exist:
$$~
\lim_{x \rightarrow 0} \frac{\sqrt{x + 25} - 5}{x}
~$$
$$~
\lim_{x \rightarrow 0} \frac{|x|}{x}
~$$
$$~
\lim_{x \rightarrow 0} \frac{(3+x)^{-1} - (3-x)^{-1}}{x}
~$$
$$~
\lim_{x \rightarrow 0+} \log(\frac{1}{|x|})^{-1/32}
~$$
- Using a table, identify the following limits. (You can use
lim
or just look at $f(0.1), f(0.01), f(0.001), ...$)
$$~
\lim_{x \rightarrow 0} \frac{\sqrt{x + 25} - 5}{x}
~$$
$$~
\lim_{x \rightarrow 0} \frac{|x|}{x}
~$$
$$~
\lim_{x \rightarrow 0} \frac{(3+x)^{-1} - (3-x)^{-1}}{x}
~$$
$$~
\lim_{x \rightarrow 0+} \log(\frac{1}{|x|})^{-1/32}
~$$
- Using
SymPy
(the limit
function) to find the following limits:
$$~
\lim_{x \rightarrow 0}\frac{\sqrt{1+x} - \sqrt{1-x}}{x}.
~$$
$$~
\lim_{x \rightarrow 4} \frac{x^{3/2} - 8}{x-4}
~$$
(Use: f(x) = (x^(3//2) - 8) / (x - 4)
.)
$$~
\lim_{x \rightarrow 0} \frac{|x|}{x}.
~$$
$$~
\lim_{x \rightarrow 0+} \log(\frac{1}{|x|})^{-1/32}
~$$