# Series Solution to the ODE $(x-1)y'' - xy' + y = 0$ with I.C. $y(0) = -3$ and $y'(0)=4$

\begin{align*} (x-1)y'' - xy' + y = 0 &\iff (x-1)\sum_{n=2}^{\infty} n(n-1)c_n x^{n-2} - x\sum_{n=1}^{\infty} nc_n x^{n-1} + \sum_{n=0}^{\infty} c_n x^n = 0 \\ &\iff \sum_{n=2}^{\infty} n(n-1)c_n x^{n-1} - \sum_{n=2}^{\infty} n(n-1)c_n x^{n-2} - \sum_{n=1}^{\infty} nc_n x^n + \sum_{n=0}^{\infty} c_n x^n = 0 \\ &\iff \sum_{k=1}^{\infty} (k+1)kc_{k+1} x^k - \sum_{k=0}^{\infty} (k+2)(k+1)c_{k+2} x^k - \sum_{k=1}^{\infty} kc_k x^k + \sum_{k=0}^{\infty} c_k x^k = 0 \\ &\iff -2c_2 + c_0 + \sum_{k=1}^{\infty} x^k \left[ k(k+1)c_{k+1} - (k+2)(k+1)c_{k+2} - kc_k + c_k \right] = 0 \\ \end{align*} Therefore, $-2c_2 + c_0 = 0 \Rightarrow c_2 = \frac{c_0}{2!}$. And, $$c_{k+2} = \dfrac{c_k (1-k) + k(k+1)c_{k+1}}{(k+2)(k+1)}$$

To find the solution, first we let $c_0 = 1$ and $c_1 = 0$, then $c_2 = \frac{1}{2!}$. Then, for $k=1$ we have: $$c_3 = \dfrac{2c_2}{3\cdot 2} = \dfrac{1}{3!}$$ For $k=2$ we have: $$c_4 = \dfrac{-2c_2 + 6c_3}{4 \cdot 3} = \dfrac{1}{4!}$$ And the pattern continues so for this solution say $y_1$ we have: $$y_1 = c_0 + c_1 x + c_2 x^2 + c_3 x^3 + \dots = 1 + \frac{x^2}{2!} + \frac{x^3}{3!} + \frac{x^4}{4!} + \dots = e^x - x$$ Now for $y_2$ we let $c_0 = 0$ and $c_1 = 1$, so that $c_2 = 0$ too. Then, we find that $c_3 = c_4 = \dots = 0$, so that $$y_2 = c_0 + c_1 x + c_2 x^2 + \dots = x$$ Then, the final solution should be $a_0 y_1 + a_1 y_2 = a_0 e^x + (a_1 - a_0)x$. However, from wolfram it says the solution is $y = a_0 e^x + a_1 e^{-x}$. Where did I go wrong?

• Your solution seems alright. In fact $e^{-x}$ isn't a solution to the ODE, so the general solution can't contain a multiple of it. – Stefan4024 Jul 26 '17 at 23:16
• isn't $c_0=-3$ and $c_1=4$ – hamam_Abdallah Jul 26 '17 at 23:16
• It seems that you typed something wrong, as Wolfram yields a solution same to yours. wolframalpha.com/input/?i=(x-1)y%27%27+-+xy%27+%2B+y+%3D+0 – Stefan4024 Jul 26 '17 at 23:18
• @Salahamam_Fatima No, you're wrong. You have constrain on $y(0)$ and $y'(0)$, which aren't directly related to c's. So first you find the general solution and then you plug those values to find the particular one. – Stefan4024 Jul 26 '17 at 23:19
• @Stefan4024 the solution is $y=c_0+c_1x+....$ – hamam_Abdallah Jul 26 '17 at 23:25

other approach

The equation can be written as

$$(x-1)(y''-y')-(y'-y)=0$$ or $$(x-1)z'-z=0$$ with $$z=y'-y$$

the solution is $$z=\lambda (x-1)=-7 (x-1)$$

Now look for series solution of

$$y'-y=-7 (x-1)$$

This ODE belongs to the class which is dealt with in here Yet another example of linear second order ODEs being reduced to hypergeometric functions. .

Using that approach we get the solution:

$$\begin{eqnarray} y(x) &=& \exp(x/2) \sqrt{x-1} \left( C_1 W_{1/2,1}(x-1) + C_2 M_{1/2,1}(x-1) \right)\\ &=& (x-1)^2 \left( C_1 U(1,3,x-1) + C_2 F_{1,1}[1,3,x-1]\right)\\ &=& (x-1)^2 \left( C_1 \frac{e^{x-1} \Gamma(2,x-1)}{(x-1)^2} + C_2 \frac{2(e^{x-1}-x)}{(x-1)^2}\right)\\ &=& C_1 x + 2 C_2 (e^{x-1}-x) \end{eqnarray}$$ Her $$W_{\kappa,\mu}()$$ and $$M_{\kappa,\mu}()$$ are the Whittaker functions and $$U$$ is the confluent hypergeometric function.