(a) We use $M(n),T(n)$ and $S(n)$ to denote the numerical value given by Midpoint rule, Trapezoidal rule and Simpson's rule with number of partition $n$ with equal spacing respectively.
To partition $[0,\pi]$ into $n=4$ even pieces, we let \[x_0=0,\quad x_1=\pi/4,\quad x_2=\pi/2,\quad x_3=3\pi/4,\quad x_4=\pi.\] Let $m_k$ be the midpoint between $x_{k-1}$ and $x_k$, then \[
m_1=\pi/8,\quad m_2=3\pi/8,\quad m_3=5\pi/8,\quad m_4=7\pi/8,
\] thus\begin{equation}\label{plug in}
M(4)=\sum_{k=1}^4 f(m_k)\Delta x = \frac{\pi}{4} \sum_{k=1}^4f(m_k),
\end{equation} where $f(x)=\ln (5+3\cos x)\,dx$. To evaluate $f(m_k)$, one needs to compute $\cos(k\pi/8)$, where $k=1,3,5,7$. These are not difficult. Recall that \[
\cos^2x=\frac{1+\cos 2x}{2}.
\] Since we know how to compute $\pi/4$, so by using this ``double angle" formula, we have \[
\cos \frac{\pi}{8}=\sqrt{\frac{1+\cos \frac{\pi}{4}}{2}}=\sqrt{\frac{\sqrt{2}+1}{2\sqrt{2}}}=:A.
\] Similarly,\begin{align*}
\cos \frac{3\pi}{8}&=\sqrt{\frac{\sqrt{2}-1}{2\sqrt{2}}}=:B,\quad\\
\cos \frac{5\pi}{8}&=- \sqrt{\frac{\sqrt{2}-1}{2\sqrt{2}}}=-B\\
\cos \frac{7\pi}{8}&=-\sqrt{\frac{\sqrt{2}+1}{2\sqrt{2}}}=-A,
\end{align*} the latter two are negative, as seen from the graph of cosine. Now by plugging in the values above to the formula (\ref{plug in}), we have\begin{align*}
M(4)&=\frac{\pi}{4}\ln ((5+3A)(5+3B)(5-3B)(5-3A))\\
&=\frac{\pi}{4}\ln (5^2-9A^2)(5^2-9B^2)\\
&=\frac{\pi}{4}\ln (410.125).
\end{align*} The last equality still follows from the formula $(a+b)(a-b)=a^2-b^2$, to see this, you need to expand $A^2$ and $B^2$.
(b) \[
T(4) =\sum_{k=1}^4 \frac{f(x_{k-1})+f(x_k)}{2}\Delta x=\frac{\pi}{4}\brac{\frac{f(x_0)+f(x_4)}{2} +f(x_1)+f(x_2)+f(x_3)}.
\]Since $f(x_0)=\ln 8$, $f(x_1)=\ln(5+3/\sqrt{2})$, $f(x_2)=\ln 5,f(x_3)=\ln(5-3/\sqrt{2})$, $f(x_4)=\ln 2$, by $(a+b)(a-b)=a^2-b^2$ again, we have \[
T(4)=\frac{\pi}{4}\ln (410).
\]
(c) Recall that given 3 points $a<m<b$, the area of the polynomial that interpolates $(a,f(a))$, $(m,f(m))$ and $(b,f(b))$ is given by\begin{equation}\label{interpo}
\boxed{\dis \frac{b-a}{6} (f(a)+4f(m)+f(b)).}
\end{equation}Unlike $M(4)$ and $T(4)$, it is suggested to memorize this complicated area. Now by this "quadratic approximation", we can derive Simpson's rule. Unlike $M(4)$ we don't construct a midpoint. Instead we use one point of the partition as our midpoint. So to use Simpson's rule we always require there be even number of partition points.
Now by using what we memorize in (\ref{interpo}), we have\begin{align*}
S(4) &= \frac{x_2-x_0}{6}\brac{f(0)+4f(\pi/4)+f(\pi/2)} \\
&\qquad \qquad \qquad \qquad + \frac{x_4-x_2}{6}\brac{f(\pi/2)+4f(3\pi/4)+f(\pi)}\\
&=\frac{\frac{\pi}{2}}{6}\brac{\begin{array}{c}\ln 8 + 4\ln(5+3/\sqrt{2}) + \ln 5+\\
\ln 5 + 4\ln(5-3/\sqrt{2})+\ln 2
\end{array} }\\
&=\frac{\pi}{6}\ln (5\cdot 41^2).
\end{align*}
Problem 2. omitted.
Problem 3. Only the partial fractions are important.
(a) $\dis \frac{1}{(x+6)(x-2)}=-\frac{1}{8(x+6)}+\frac{1}{8(x-2)}$.
Observe that \[
\frac{1}{(x-a)(x-b)}=\frac{1}{b-a}\frac{(x-a)-(x-b)}{(x-a)(x-b)} =\frac{1}{b-a}\brac{\frac{1}{x-b}-\frac{1}{x-a}}.
\] Here we try to subtract two linear factors to get a constant, then we divide our fraction by this constant to compensate the change. Of course when there are 3 factors, we can repeat this step 3 times to get a partial fractions, but this starts to be complicated.
(b) Assume $\dis \frac{5x^3-12x^2+5x-4}{(2x+1)(x-1)^3} =\frac{A}{2x+1}+\frac{B}{x-1}+\frac{C}{(x-1)^2}+\frac{D}{(x-1)^3}$, we have \[
5x^3-12x^2+5x-4= A(x-1)^3+B(2x+1)(x-1)^2+C(2x+1)(x-1)+D(2x+1).
\] We choose suitable values such that RHS is as many zero terms as possible. The simplest choices are $x=1$ and $x=-\frac{1}{2}$ respectively.
Put $x=1$, we have $D=-2$.
Put $x=-\frac{1}{2}$, we have $A=3$.
Next we have two coefficients to be determined. We randomly assign two convenient values $x$'s to construct two linear equations with two unknowns.
Put $x=0$, we have $B-C=1$.
Put $x=-1$, we have $-2B+C=-2$.
We solve them to get $B=1$ and $C=0$, hence we are done.
(c) Assume $\dis \frac{6x^2-3x+7}{(4x+1)(x^2+4)}=\frac{A}{4x+1}+\frac{Bx+C}{x^2+4}$, then \[
6x^2-3x+7=A(x^2+4)+(Bx+C)(4x+1).
\]
Put $x=-\frac{1}{4}$, we have $A=2$.
Now two unknows left, randomly assign convenient values!
Put $x=0$, $8+C=7\implies C=-1$.
Put $x=1$, $2+B+C=2\implies B=1$.
(d) It is given that $\sqrt{2}$ is a root of $P(x)=x^4-2x^3+4x-4$. Recall from high school we know that
Theorem. Let $Q(x)$ be a polynomial with rational coefficients. Also, let $a,b$ be rational and $\sqrt{c}$ be irrational. If $a+b\sqrt{c}$ is a root of $Q$, so is $a-b\sqrt{c}$.Thus $-\sqrt{2}$ is also a root of $P$, hence $(x+\sqrt{2})(x-\sqrt{2})=x^2-2$ divides $P$, and a long division gives \[
P(x)=(x^2-2)(x^2-2x+2).
\] Assume $\dis \frac{x-1}{x^4-2x^3+4x-4}=\frac{Ax+B}{x^2-2}+\frac{Cx+D}{x^2-2x+2}$, then \[
x-1=(A+C)x^3+(-2A+B+D)x^2+(2A-2B-2C)x+2B-2D.
\] By comparing coefficients, we have \begin{align}
\label{1}A+C&=0\\
\label{2}-2A+B+D&=0\\
\label{3}2A-2B-2C&=1\\
\label{4}2B-2D&=-1.
\end{align} $2\times (\ref{1}) + (\ref{3})$ and $2\times (\ref{2}) + (\ref{4})$ produces two equations with unknowns $A$ and $B$, so we have $A=-\frac{1}{4}$ and $B=0$. Thus we have $C=-\frac{1}{4}$ and $D=\frac{1}{2}$. A usual computation gives \[
\int_0^1\frac{x-1}{x^4-2x^3+4x-4}\,dx = \frac{\pi}{16}.
\]
Problem 4. Since \[
\int \frac{dx}{(e^x-2)(e^x+1)}=\int \frac{e^x\,dx}{e^x(e^x-2)(e^x+1)}=\int \frac{d(e^x)}{e^x(e^x-2)(e^x+1)},
\] if we let $u=e^x$, then the integral becomes \[
\int\frac{du}{u(u-2)(u+1)}.
\] Thus the technique of partial fractions will do.

No comments:
Post a Comment