Using Maclaurin expansion to find approximation for an equation

134 Views Asked by At

So I wonder how can I use Maclaurin expansion to get an approx answer for this equation:

$ 10x^2 = \cos(x)$

The error must be no bigger than $10^{-4}$

I know that I need to use Lagrange error bound. But I have no idea how to implement this idea here.

I started with writing Maclaurin expansion of order 3 for $\cos(x)$:

$\cos(x)$ = $ 1 - \frac{x^2}{2} + R_3(x)$

Where $R_3(x)$ is the remainder.

$ 10x^2 = 1 - \frac{x^2}{2} + R_3(x)$

But from here I have no idea what to do, I don't think that's even the right approach to this problem.

Can someone explain to me how can I use Maclaurin expansion to find an approx answer to equations?

Thank you.

2

There are 2 best solutions below

0
On BEST ANSWER

Yes, we may use the Maclaurin expansion but we need an explicit form for the remainder. By Taylor's theorem, $$\cos(x)=1-\frac{x^2}{2}+R_4(x)=1-\frac{x^2}{2}+\frac{\cos(t)x^4}{4!}$$ where $0<t<x$. Let $x_0$ be the positive solution of $10x^2 = \cos(x)$ and let $x_1$ be the positive solution of the approximate equation $10x^2 = 1-\frac{x^2}{2}$ i.e. $x_1=\sqrt{2/21}\approx 0.3086067$. Note that $f(x)=10x^2-\cos(x)$ is an even continuous function which is increasing for $x\geq 0$. Since $f(0.3)<0$, $f(0.31)>0$ it follows that $x_0\in(0.3,0.31)$.

Now we try to bound the distance $|x_0-x_1|$. We have that $$\frac{21x_0^2}{2}=1+\frac{\cos(t)x_0^4}{4!}\quad\text{and}\quad \frac{21x_1^2}{2}=1$$ and therefore $$0<x_0^2-x_1^2=\frac{\cos(t)x_0^4}{252}$$ or $$0<x_0-x_1=\frac{\cos(t)x_0^4}{252 (x_0+x_1)}< \frac{x_0^4}{504\sqrt{2/21}}<10^{-4}.$$ where at the last step we used the rough estimate $x_0\in (0.3,0.31)$.

0
On

Just for your curiosity.

Sooner or later, you will learn that, for function approximation, Padé approximants are much better than Taylor expansions (if, on this you type Padé in the search bar, you will find hundreds of entries).

Developed around $x=0$, the $[n,m]$ approximant write

$$f(x)=\frac{\sum_{i=0}^n a_i\,x^i }{1+\sum_{i=1}^m b_i\,x^i }$$ and, as for Taylor, the coefficients are related to the derivatives of the function at $x=0$.

To make your problem simple, let $t=x^2$ and work the $[1,n]$ approximant. This means that the approximation of the solution is obtained solving a linear equation in $x$.

Applied to your case, the successive approximants will be $$P_0=\frac{21 t}{2}-1\qquad P_1=\frac{\frac{2645 t}{252}-1}{\frac{t}{252}+1}\qquad P_2=\frac{\frac{832861 t}{79350}-1}{-\frac{37 t^2}{317400}+\frac{157 t}{39675}+1}$$ and so on.

In the table, I give you, as a function of $n$, the rational value of the approximate solution $t_n=x_n^2$ as well as its decimal representation. $$\left( \begin{array}{ccc} n & t_n & t_n \approx \\ 0 & \frac{2}{21} & 0.0952380952380952 \\ 1 & \frac{252}{2645} & 0.0952741020793951 \\ 2 & \frac{79350}{832861} & 0.0952740013039391 \\ 3 & \frac{46640216}{489537705} & 0.0952740014173168 \\ 4 & \frac{44058393450}{462438784921} & 0.0952740014173479 \\ 5 & \frac{61041919609572}{640698602992205} & 0.0952740014173477 \\ 6 &\frac{116607145744581310}{1223913596677690101} & 0.0952740014173477 \end{array} \right)$$