# Series of function problem

• Jun 29th 2010, 09:15 AM
Also sprach Zarathustra
Series of function problem
Find $y=\Sigma c_n x^n$, with the next conditions:

1. $y=1$ when $x=1$

2. $y'=1$ when $x=1$

3. $y''+y=0$

I need an answer without using the fact that the function: $y=sinx+cosx$ satisfies all conditions above.

What I'm asking is, how can I solve it strictly from those conditions...(without guessing)

Thank you!
• Jun 29th 2010, 09:53 AM
Defunkt
Note that $y = sinx + cosx$ only satisfies the ODE, not the initial conditions (1, 2).

To generally solve this, consider

$y = \sum_{n=0}^{\infty}c_nx^n$ so
$y' = \sum_{n=1}^{\infty}nc_nx^{n-1}$
and $y'' = \sum_{n=2}^{\infty}n(n-1)c_nx^{n-2}$

Now put those two in the ODE ( $y'' + y =0$) and put them together under the same summation (consider the change of variable k = n-2 for y'')
You'll get a recursive formula for $c_n$, from which you will be able to derive a general solution. After that, plug in the initial conditions to get the specific solution.
• Jun 29th 2010, 09:57 AM
TheEmptySet
Quote:

Originally Posted by Also sprach Zarathustra
Find $y=\Sigma c_n x^n$, with the next conditions:

1. $y=1$ when $x=1$

2. $y'=1$ when $x=1$

3. $y''+y=0$

I need an answer without using the fact that the function: $y=sinx+cosx$ satisfies all conditions above.

What I'm asking is, how can I solve it strictly from those conditions...(without guessing)

Thank you!

First take two derivatives of the series

$y''=\sum_{n=2}^{\infty}n(n-1)c_nx^{n-2}$

and plug this into the ODE to get

$y''+y=\sum_{n=2}^{\infty}n(n-1)c_nx^{n-2}\sum_{n=0}^{\infty}c_{n}x^{n}=0$

Now re-index the the first sereis to start at 0.

$\sum_{n=0}^{\infty}(n+2)(n+1)c_{n+2}x^{n}+\sum_{n= 0}^{\infty}c_{n}x^{n}=0$

$\sum_{n=0}^{\infty}\left[(n+2)(n+1)c_{n+2}+c_{n}\right]x^{n}=0$

This gives us a relationship between the coeffients of the power series.

$c_{n+2}=-\frac{c_{n}}{(n+1)(n+2)}$

Using this we get

$c_2=-\frac{c_{0}}{1\cdot 2}$
$c_3=-\frac{c_{1}}{2\cdot 3}$
$c_4=\frac{c_{2}}{3\cdot 4}=\frac{c_{0}}{4!}$
$c_5=\frac{c_{1}}{4\cdot 5}=\frac{c_{1}}{5!}$
$c_6=-\frac{c_{2}}{5\cdot 6}=\frac{c_{0}}{6!}$
.
.
.

Notice the even $c_n$'s give

$y=c_{0}\sum_{n=0}^{\infty}\frac{(-1)^nx^{2n}}{(2n)!}=c_{0}\cos(x)$

Notice the odd $c_n$'s give

$y=c_{1}\sum_{n=0}^{\infty}\frac{(-1)^nx^{2n+1}}{(2n+1)!}=c_{1}\sin(x)$
• Jun 29th 2010, 10:28 AM
chisigma
A Taylor expansion around x=1 is easy to find considering that is $y(1)=1$ , $y^{'} (1) = 1$ and that $y^{''} (x) = - y(x)$ , so that is...

$y^{''}(1) = -y(1) = -1$

$y^{(3)} (1) = - y'(1) = -1$

$y^{(4)} (1) = - y^{''} (1) = 1$

$y^{(5)} (1) = - y^{(3)} (1) = 1$

$\dots$

... that brings to the Taylor expansion...

$y(x) = 1 + (x-1) - \frac{(x-1)^{2}}{2!} - \frac{(x-1)^{3}}{3!} + \frac{(x-1)^{4}}{4!} + \frac{(x-1)^{5}}{5!} - \dots$ (1)

Kind regards

$\chi$ $\sigma$