In this 40 point final project, you'll solve 4 fairly basic problems from scratch using Python in the Jupyter notebook.
Have fun!
Let $n$ be an integer larger than $1$. In this problem, we'll explore the system $$ \begin{align} 10^{-n}x + y &= 1 \\ x + y &= 2. \end{align} $$
Solve the system by hand with and without pivoting. Use LaTeX to put your results in the notebook. (You don't need to type out your whole solution - just the answers.)
Set $n=12$ and evaluate the expressions that you obtain for $x$
Which result is better and why?
Find a least squares fit to the data $$\{(-1,0),(0,1),(1,1/2)\}$$ using a function of the form $f(x)=a+b\cos(x)$. Plot the result with the data.
Estimate the solution to the IVP $y' = y(10-y)$; $y(0)=1$ over the time interval $0\leq t \leq 1$ using odeint
and plot the result.
Let $f$ be the function that interpolates the following data of $x$ and $y$ coordinates, as given by interp1d
.
xs,ys = (
[0.00421211, 0.05669495, 0.06117997, 0.18771917, 0.26872849,
0.45752444, 0.51013805, 0.86553414, 0.89077439, 0.89898213,
0.99087017, 1.30318595, 1.44308006, 1.52456016, 1.52754924,
1.5774467 , 1.67153021, 1.69486747, 1.80285492, 1.89054139],
[1.0, 0.99999483, 0.999993 , 0.99937919, 0.99739363,
0.97817065, 0.96632804, 0.73226845, 0.70136973, 0.69082354,
0.55550704, -0.12715214, -0.48964603, -0.68418628, -0.69081117,
-0.79410997, -0.94019997, -0.96403265, -0.99409871, -0.90789806])
If $b$ denotes the smallest positive root of $f$, compute $$\int_0^b f(x) dx.$$