I've been working on a problem for quite some time now. I want to solve the differential equation $ f'(x) = f(x) + x f(x)$ with condition $f(0) = 0 $ with the power series method. I already know the answer which is $f(x) = x e^x $ but I can't seem to find it using that particular method. Here's my attempt :

We assume a solution of the form $ f(x) = \sum_{k \geq 0} a_k x^k $. The derivative have the form $ f'(x) = \sum_{k \geq 1} k \cdot a_k x^{k-1} $ and we can rewrite the differential equation as :

$ \sum_{k \geq 1} k \cdot a_k x^{k-1} = \sum_{k \geq 0} a_k x^k + \sum_{k \geq 0} a_k x^{k+1} $

I then make an index change in the from k to k+1 in the first sum and k to k-1 in the last one to match all the $x^k$ :

$ \sum_{k \geq 0} (k+1) \cdot a_{k+1} x^{k} = \sum_{k \geq 0} a_k x^k + \sum_{k \geq 1} a_{k-1} x^{k} $

and I rewrite :

$ a_1 + \sum_{k \geq 1} (k+1) \cdot a_{k+1} x^{k} = a_0 + \sum_{k \geq 1} a_k x^k + \sum_{k \geq 1} a_{k-1} x^{k} $

Because of the initial condition , we know that $a_0 = 0 $ and so we have

$ a_1 + \sum_{k \geq 1} [(k+1) \cdot a_{k+1} -a_k - a_{k-1} ] x^{k} =0$

Here's my problem. I normally don't have that $a_1$ standing there when I solve that type of problem. So I can't say that the coefficient $(k+1) \cdot a_{k+1} -a_k - a_{k-1} = 0 $ as I normally would to find the recurrence relation... Is there anything I should do differently to progress?


  • 1
    $\begingroup$ It will be more useful (and easier on your hands) to use to learn MathJax to write mathematics. $\endgroup$ – Oliver Diaz Apr 15 at 23:46
  • 1
    $\begingroup$ Your last equation implies $a_1=0$. Are you sure $f(x)=xe^x$ is a solution? $\endgroup$ – Karl Apr 15 at 23:57
  • $\begingroup$ There is the small problem that $xe^x$ doesn't actually solve the differential equation. The solution to any ODE of the form $f'=g\cdot f$ is $$f=C\exp\left(\int g\right)$$ $\endgroup$ – Ninad Munshi Apr 15 at 23:57
  • 1
    $\begingroup$ You are all completely correct. My teacher left this as an exercise at the end of the class. He must have been in a hurry because there's a mistake in the statement ! The ODE should have been f'(x) =f/x + f which is way easier to solve! Thanks everyone and sorry for bothering with that!! $\endgroup$ – Riemann9471 Apr 16 at 0:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.