# I need to calculate a taylor polynomial for a function

I need to calculate a taylor polynomial for a function $f:R\to R$ where we know the following
$f{}^{″}\left(x\right)+f\left(x\right)={e}^{-x}\mathrm{\forall }x$
$f\left(0\right)=0$
${f}^{\prime }\left(0\right)=2$
You can still ask an expert for help

## Want to know more about Laplace transform?

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

lalilulelo2k3eq
We have the following $f{}^{″}\left(x\right)+f\left(x\right)={e}^{-x}$
and $f\left(0\right)=0,{f}^{\prime }\left(0\right)=2$.
And thus we need to find ${f}^{\left(n\right)}\left(0\right)$ to construct the Taylor series.
Note that we already have two values and can find $f{}^{″}\left(0\right)$ since
$f{}^{″}\left(0\right)+f\left(0\right)={e}^{-0}$
$f{}^{″}\left(0\right)+0=1$
$f{}^{″}\left(0\right)=1$
So now we differentiate the original equation and get:
$f{}^{‴}\left(x\right)+{f}^{\prime }\left(x\right)=-{e}^{-x}$
But since we know ${f}^{\prime }\left(0\right)=2$, then
$f{}^{‴}\left(0\right)+{f}^{\prime }\left(0\right)=-{e}^{-0}$
$f{}^{‴}\left(0\right)+2=-1$
$f{}^{‴}\left(0\right)=-3$
And we have our third value. Differentiating one more time gives
${f}^{IV}\left(x\right)+f{}^{″}\left(x\right)={e}^{-x}$
So again we have
${f}^{IV}\left(0\right)+f{}^{″}\left(0\right)=1$
${f}^{IV}\left(0\right)+1=1$
${f}^{IV}\left(0\right)=0$
Using this twice more you'll get
${f}^{V}\left(0\right)=2$
${f}^{VI}\left(0\right)=1$
${f}^{VII}\left(0\right)=-3$
In general the equation is saying that
${f}^{\left(2n+2\right)}\left(0\right)+{f}^{\left(2n\right)}\left(0\right)=1$
${f}^{\left(2n+1\right)}\left(0\right)+{f}^{\left(2n-1\right)}\left(0\right)=-1$
which will allow you to get all values.
A little summary of the already known values:
$f\left(0\right)=0$
${f}^{\prime }\left(0\right)=2$
$f{}^{″}\left(0\right)=1$
$f{}^{‴}\left(0\right)=-3$
${f}^{IV}\left(0\right)=0$
${f}^{V}\left(0\right)=2$
${f}^{VI}\left(0\right)=1$
Jillian Edgerton
The Frobenius method for solving differential equations is easily done: assume an ansatz
$f\left(x\right)={c}_{0}+\sum _{k=1}^{\mathrm{\infty }}{c}_{k}{x}^{k}$
and you have the derivatives${f}^{\prime }\left(x\right)=\sum _{k=1}^{\mathrm{\infty }}k{c}_{k}{x}^{k-1}={c}_{1}+\sum _{k=1}^{\mathrm{\infty }}\left(k+1\right){c}_{k+1}{x}^{k}$
$f{}^{″}\left(x\right)=\sum _{k=1}^{\mathrm{\infty }}k\left(k+1\right){c}_{k+1}{x}^{k-1}$
From these, you have (why?); a relation for the other ${c}_{k}$ can be derived by comparing the series coefficients of $f\left(x\right)+f{}^{″}\left(x\right)$ with the coefficients of $\mathrm{exp}\left(-x\right)$.
###### Not exactly what you’re looking for?
RizerMix

This is a 2nd order linear non-homogeneous ODE with solution $f\left(x\right)=\frac{-1}{2}\mathrm{cos}x+\frac{5}{2}\mathrm{sin}x+\frac{1}{2}{e}^{-x}$. With the Taylor series for $\mathrm{sin}\left(x\right),\mathrm{cos}\left(x\right)$, in hand, you should be able to compute the series for f straightforwardly.