All works must be seen!
Algorithm Homework:
A person is walking away from a streetlight at a constant speed of 1 meter per second. The person’s height is 1.8 meters, and there is a streetlight that is 5 meters above the ground. The person casts a shadow on the ground.
- At what rate is the person’s shadow length changing when they are 10 meters away from the streetlight?
- Find the rate of change of the angle of elevation of the person’s line of sight to the streetlight when they are 10 meters away from the streetlight.
Use a linear approximation to estimate the given number, and use concavity to determine if your estimate is an over or under estimate.
- (1.999)^4
- 1/4.002
The circumference of a sphere was measured to be 84 cm with a possible error of 0.5 cm.
- Use differentials to estimate the maximum error in the calculated surface area. What is the relative error?
- Use differentials to estimate the maximum error in the calculated volume. What is the relative error?
Show that if $f$ is a continuous function on an open interval contaning $[a,b]$ with $f(a)f(b)<0$ and $f’(x)>0$ for all $x\in [a,b]$, then $f$ has a unique zero (solution of $f(x)=0$) in $[a,b]$.
If $f$ is differentiable on an open interval containing $[0,1]$ with $f(0)=1$ and $f(1)=0$, then there exists $c\in (0,1)$ such that $f’(c)=-\frac{f(c)}{c}$.
Evaluate $\displaystyle\lim_{x\to \infty}\sin\left(\frac{1}{x}\right)^{\tan^{-1}(\frac{1}{x})}$.
Answer the following questions about $f(x)=x\left(\ln(x)\right)^2$:
- Is $f$ an odd function or even function?
- Find all critical points of $f$, and determine local maximal and local minimal values of $f(x)$.
- Find the intervals of increase/decrease of $f$.
- Find the interval on which f(x) is concave upward/downward.
- Find the asymptotes (vertical, horizontal, or slant) of $y=f(x)$
- Sketch the graph of $f(x)$
Newton’s method is an iterative numerical technique used to approximate solutions for equations, often employed to find the roots of real-valued functions. Below is a pseudocode representation of Newton’s method:
Goal: Find an approximate solution x1 to the equation f(x) = 0.
Input: A function (f), an initial value (x0), a tolerance error (err), and a maximum number of iterations (m).
Return: An approximate solution x1 with |f(x1)| less than err or reaching the maximum number of iterations.
Code:
def NewtonMethod(f, x0, err, m):
x = x0
iteration = 0
while iteration < m:
if abs(f(x)) < err:
return x
if f'(x) == 0:
return "No solution found"
x = x - f(x) / f'(x) # Find the x-intercept of the tangent line to the curve y = f(x) at (x, f(x))
iteration = iteration + 1
return "Exceeded the maximum number of iterations"
Your task is to implement the provided pseudocode in Sage/Python or any language you are used to use and use your code to approximate the solution of the equation $\cos(x) = x^2 - 4$ to six decimal places.