1
$\begingroup$

I have a first order differential equation:

$y'(x)-2xy(x)=2x$

I want to construct a function that satisfies this equation by using power series.

General approach:

$y(x)=\sum_0^\infty a_nx^n$

Differentiate once:

$y'(x)=\sum_1^\infty a_nnx^{n-1}$

Now I plug in the series into my diff. equation:

$\sum_1^\infty a_nnx^{n-1}-2x\sum_0^\infty a_nx^n=2x$

$\iff \sum_0^\infty a_{n+1}(n+1)x^n-2x\sum_0^\infty a_nx^n=2x$

$\iff \sum_0^\infty [a_{n+1}(n+1)x^n-2xa_nx^n]=2x$

$\iff \sum_0^\infty [a_{n+1}(n+1)-2xa_n]x^n=2x $

Now I can equate the coefficients:

$a_{n+1}(n+1)-2xa_n=2x$

I am stuck here. I don't really understand why equating the coefficients works in the first place. Whats the idea behind doing this. I don't want to blindly follow some rules so maybe someone can explain it to me. Do I just solve for $a_{n+1}$ now?

Thanks in advance

Edit:

Additional calculation in response to LutzL:

$\sum_1^\infty a_nnx^{n-1}-\sum_0^\infty 2a_nx^{n+1}=2x$

$\iff \sum_0^\infty a_{n+1}(n+1)x^n-\sum_1^\infty 2a_{n-1}x^n=2x$

$\iff \sum_1^\infty a_{n+1}(n+1)x^n+a_1-\sum_1^\infty 2a_{n-1}x^n=2x$

$\iff \sum_1^\infty [a_{n+1}(n+1)-2a_{n-1}]x^n=2x-a_1$

So how do I deal with the x on the other side now? Can I just equate the coefficients like this:

$a_{n+1}(n+1)-2a_{n-1}=2x-a_1$?

$\endgroup$
  • $\begingroup$ Go one step further: $$\sum_{n=2}^∞[a_{n+1}(n+1)−2a_{n−1}]x^n=2x−(2a_2-2a_0)x-a_1$$ to get $a_1=0$, $a_2=a_0+1$ and $a_{n+1}=2a_{n-1}/(n+1)$ for all further degrees $n=2,3,…$. $\endgroup$ – LutzL Apr 12 '15 at 11:19
  • $\begingroup$ Nice! Will try that. Thank you very much for your help. $\endgroup$ – qmd Apr 12 '15 at 11:27
  • $\begingroup$ I am really sorry but I just can't understand how you are getting $a_1=0$. Are you just plugging in n=1,2,3.... ? Could you maybe show me what I am comparing these coefficients with. $\endgroup$ – qmd Apr 12 '15 at 14:21
  • $\begingroup$ Because $a_1$ is the only constant term. As said in the answer, you have to balance the coefficients of the same powers of $x$ on both sides of the equation. $\endgroup$ – LutzL Apr 12 '15 at 14:25
2
$\begingroup$

it may be easier to see what is going on if you $\bf don't $ use the sigma notation for the sums. here is how finding solution by series works. you assume the solution is of the form $$y = a_0 + a_1x + a_2 x^2 + a_3x^3 +\cdots\\y' = a_1 + 2a_2 x + 3a_3x^2 +\cdots $$ and sub in the differential equation $y' - 2xy = 2x.$ that gives $$a_1 + 2a_2 x + 3a_3x^2 +\cdots -2x\left(a_0 + a_1x + a_2 x^2 + a_3x^3 +\cdots\right) = 2x \to \\ a_1 + (2a_2 - 2a_0)x + (3a_3 - 2a_1)x^2 + (4a_4-2a_2)x^3+ \cdots = 0 + 2x + 0x^2 + 0x^3 + \cdots \tag 1$$

we make $(1)$ hold true by picking the right values for the coefficients $a_0, a_1, a_2, \cdots$

equating the constant term, we find $$\begin{align} 1:\,a_1 &= 0\\ x:\,2a_2 - 2a_0 &= 2 \to a_2 = 1 + a_0\\ x^2:\,3a_3 - 2a_1 &= 0 \to a_3 = 0\\ x^3:\, 4a_4 - 2a_2 &= 0 \to a_4 = \frac12a_2 = \frac12 (1+a_0)\\ x^4:\,5a_5 - 2a_3 &= 0\to a_5 = 0 \\ x^5:\, 6a_6 - 2a_4 &\to a_6 = \frac13a_2 = \frac1{3!}(1+a_0)\\ \vdots\\ a_{2n} &=\frac 1{n!}(1+a_0), a_{2n+1} = 0. \end{align}$$

now collecting all these together, we have $$\begin{align}y &= a_0 + \left(1 + a_0\right)x^2 + \frac 1{2!}\left(1 + a_0\ \right)x^4 +\cdots\\ &=x^2 + \frac 1{2!} x^4 + \cdots + a_0\left(1 + x^2 + \frac1{2!}x^4 + \frac1{3!} x^6 + \cdots\right)\\ &=e^{x^2}-1 + a_0e^{x^2}\end{align}$$

in particular, you see that if we set $a_0 = -1$ we find that $y = -1$ is a particular solution.

therefore the general solution is $$y = e^{x^2}-1 + a_0e^{x^2} $$ where $a_0$ is arbitrary.

$\endgroup$
  • $\begingroup$ Thank you! That helped a lot. $\endgroup$ – qmd Apr 12 '15 at 12:54
  • $\begingroup$ Just a quick question about equating the coefficients. I still don't quite understand what to equate them with. How are you getting $a_1=0$ and where did the $2x$ on the other side of the equation go. $\endgroup$ – qmd Apr 12 '15 at 13:52
  • $\begingroup$ suppose someone tells you that $x^2 + 3x + 2 = ax^2 + bx + c$ needs to be true for all $x.$ how will you find out what $a, b, c$ must be? $\endgroup$ – abel Apr 12 '15 at 14:44
  • $\begingroup$ Then I would just equate the coefficients of x. $1x^2=ax^2$ and so on. However let's take this equation: $\sum_2^\infty [a_{n+1}(n+1)−2a_{n−1}]x^n=2x−(2a_2−2a_0)x−a_1]$ If I want to find the coefficients of $x^1$ then on the right I get $2-2a_2-2a_0$ How would I find them on the left? $\endgroup$ – qmd Apr 12 '15 at 15:06
  • 1
    $\begingroup$ @Rzeta, you are welcome. i teach for a living and so i have lots of patience. no it does not. making $y = 0$ at $x = 0$ will force $a_0 = 0.$ $\endgroup$ – abel Apr 12 '15 at 15:34
1
$\begingroup$

You have to compare coefficients of like powers, there should be no variable $x$ remaining in the resulting equations. For that one has invented a technique called "index shift", that you actually correctly employed in the case of the derivative series. In the other part, $$ x\sum_{k=0}^\infty a_kx^k=\sum_{k=0}^\infty a_kx^{k+1}=\sum_{n=1}^\infty a_{n-1}x^n $$ And using the Kronecker delta $$ 2x=\sum_{n=0}^\infty (2\delta_{n,1})x^n $$ where $$ δ_{n,a}=\begin{cases}1&n=a\\0&n\ne a\end{cases} $$

$\endgroup$
  • $\begingroup$ Thanks. I don't know what the kronecker delta is. If I shift the index as you suggested then I have two series starting at $n=1$. However, in one series I have $x^n$ and in the other series (y'(x)) I have a $x^{n-1}$. How will I be able to combine them and factor out a $x^n$ without there being a $x^{-1} $ left? $\endgroup$ – qmd Apr 12 '15 at 10:53
  • $\begingroup$ I am going to add the calculation I did in my question. $\endgroup$ – qmd Apr 12 '15 at 11:01
  • $\begingroup$ You can treat the cases $n=0$ and perhaps also $n=1$ separately, or introduce the artificial coefficient $a_{-1}=0$. $\endgroup$ – LutzL Apr 12 '15 at 11:12
  • $\begingroup$ I have added a calculation in my opening post. Is the goal to get rid of all the x's? Even the 2x on the other side? $\endgroup$ – qmd Apr 12 '15 at 11:13
  • 1
    $\begingroup$ Yes. Coefficients are constant and thus independent of the variable $x$. You compare terms of the same degree, the degree includes contributions of all factors. $\endgroup$ – LutzL Apr 12 '15 at 11:15

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.