McLaurin series expansion to evaluate a function

199 Views Asked by At

I have a maths assignment due for college based on the McLaurin series and don't understand how to do it. I need to use a McLaurin series expansion to evaluate a function. The function is the solution this differential equation: $$ \frac{d^2f}{dx^2} + 5\frac{df}{dx} + 4f = 0, $$ with $df/dx(0) = 0$ and $f(0) = 2$ Can you please help me make a start with this and I will get back to you with any progress I make. Thank you.

1

There are 1 best solutions below

13
On BEST ANSWER

Method 1: $$f(x)=f(0)+\frac{f'(0)}{1!}x+\frac{f''(0)}{2!}x^2+\frac{f^{(3)}(0)}{3!}x^3+\cdots$$

You have: $$f(0)=2$$ $$f'(0)=0$$

Replacing that in your differential equation:

$$ f''(0) + 5f'(0) + 4f(0) = 0 $$ $$ f''(0)+5\cdot 0 +4\cdot 2=0 $$

$$ f''(0)=-8 $$

If you take the derivative of your differential equation:

$$ \frac{d^3f}{dx^3} + 5\frac{df^2}{dx^2} + 4\frac{df}{dx} = 0, $$

And evaluating in $0$:

$$ \frac{d^3f}{dx^3}(0) + 5f''(0) + 4f'(0) = 0, $$ $$ \frac{d^3f}{dx^3}(0)=40 $$

In general you can derivate $n$ times to obtain:

$$f^{(n+2)}+5f^{(n+1)}+4f^{(n)}=0$$

Which can be evaluated in $0$ to obtain a relationship between the derivatives at $x=0$:

$$f^{(n+2)}(0)+5f^{(n+1)}(0)+4f^{(n)}(0)=0$$

Method 2:

Call

$$a_n=f^{(n)}(0)$$

$$f(x)=\sum_{n=0}^{\infty} \frac{a_n}{n!} x^{n}$$ $$f'(x)=\sum_{n=1}^{\infty} \frac{a_n}{(n-1)!} x^{n-1}=\sum_{n=0}^{\infty} \frac{a_{n+1}}{n!} x^{n}$$ $$f''(x)=\sum_{n=2}^{\infty} \frac{a_n}{(n-2)!} x^{n-2}=\sum_{n=0}^{\infty} \frac{a_{n+2}}{n!} x^{n}$$

Replacing in the differential equation:

$$ \frac{d^2f}{dx^2} + 5\frac{df}{dx} + 4f = 0, $$ $$ \sum_{n=0}^{\infty} (a_{n+2}+5a_{n+1}+4a_{n}) x^n=0 $$

Therefore you have the recurrence relation:

$$a_{n+2}+5a_{n+1}+4a_{n}=0$$ $$a_{0}=2$$ $$a_{1}=0$$

Note: if you are not able to solve the relationship between the coefficients just show a few terms. The recurrence solution is (using wolfram alpha I'm not an expert on this):

$$f^{(n)}(0) = -\frac{2}{3} (-1)^n (4^n-4)$$