# 1st order differential equation

## Homework Statement

(Can someone please check my work? Bear with me, this is my first time using LaTex on this forum...)
Find the general solution to the first oder ODE

$$y'-y=e^x$$

by substituting a series
$$y= \sum_{n=0}^\infty a_n x^n$$ about $$x_0=0$$, finding the recurrence relation for a_n, and solving to find an expression for the general term $$a_n$$ in terms of $$a_0$$. What is the radius of convergence of the solution?

## Homework Equations

$$e^x = \sum_{n=0}^\infty \frac{x^n}{n!}$$

## The Attempt at a Solution

I plugged y into the DE:
$$\sum_{n=1}^\infty a_n n x^{n-1} - \sum_{n=0}^\infty a_n x^n = \sum_{n=0}^\infty \frac{x^n}{n!}$$

Then I made all series start at n=0:
$$\sum_{n=0}^\infty a_{n+1} (n+1) x^n - \sum_{n=0}^\infty a_n x^n - \sum_{n=0}^\infty \frac{x^n}{n!} = 0$$

Bringing together like terms:
$$\sum_{n=0}^\infty x^n (a_{n+1} (n+1) - a_n - \frac{1}{n!}) = 0$$

Set coefficients equal to zero:
$$a_{n+1} (n+1) - a_n - \frac{1}{n!} = 0$$

Solving for recurrence relation:
$$a_{n+1} = \frac{n!a_n +1}{(n+1)!}$$

After plugging in n=0,1,2,3,4... the pattern is:
$$a_n = \frac{a_0 + n}{n!}$$

Therefore, the solution is:
$$y = a_0 + (a_0 + 1)x+(\frac{a_0 + 2}{2})x^2 + (\frac{a_0 + 3}{6})x^3 +...$$

Last edited:

Related Calculus and Beyond Homework Help News on Phys.org
HallsofIvy
Homework Helper

## Homework Statement

(Can someone please check my work? Bear with me, this is my first time using LaTex on this forum...)
Find the general solution to the first oder ODE

$$y'-y=e^x$$

by substituting a series
$$y= \sum_{n=0}^\infty a_n x^n$$ about $$x_0=0$$, finding the recurrence relation for a_n, and solving to find an expression for the general term $$a_n$$ in terms of $$a_0$$. What is the radius of convergence of the solution?

## Homework Equations

$$e^x = \sum_{n=0}^\infty \frac{x^n}{n!}$$

## The Attempt at a Solution

I plugged y into the DE:
$$\sum_{n=1}^\infty a_n n x^{n-1} - \sum_{n=0}^\infty a_n x^n = \sum_{n=0}^\infty \frac{x^n}{n!}$$

Then I made all series start at n=0:
$$\sum_{n=0}^\infty a_{n+1} (n+1) x^n - \sum_{n=0}^\infty a_n x^n - \sum_{n=0}^\infty \frac{x^n}{n!} = 0$$

Bringing together like terms:
$$\sum_{n=0}^\infty x^n (a_{n+1} (n+1) - a_n - \frac{1}{n!}) = 0$$

Set coefficients equal to zero:
$$a_{n+1} (n+1) - a_n - \frac{1}{n!} = 0$$

Solving for recurrence relation:
$$a_{n+1} = \frac{n!a_n +1}{(n+1)!}$$After plugging in n=0,1,2,3,4... the pattern is:
$$a_n = \frac{a_0 + n}{n!}$$

Therefore, the solution is:
$$y = a_0 + (a_0 + 1)x+(\frac{a_0 + 2}{2})x^2 + (\frac{a_0 + 3}{6})x^3 +...$$

You've done remarkably well so far. The standard way to determine the radius of convergence of a power series is to use the "ratio" test.
If $a_n= (a_0+ n)/n!$, then $a_{n+1}= (a_0+ n+1)/(n+1)!$. The ratio $a_{n+1}x^{n+1}/a_nx^n$ is
$$\frac{a_0+ n+ 1}{(n+1)!}\frac{n!}{a_0+ n}x= \frac{a_0+ n+ 1}{n(a_0+ n)}x$$
what is the limit of that as n goes to infinity? What values of x make it less than 1?

Dick
Homework Helper
You can easily check your result by realizing that the differential equation is pretty easy to solve. It's y=x*e^x+a0*e^x. Expand this and compare with your solution. For radius of convergence, how about trying a ratio test?

HallsofIvy, the limit of the ratio test as n goes to infinity is zero, so x can be infinite; the radius of convergence is infinite. Could you say the radius of convergence is infinite, as all parts of the DE have infinite radii of convergence? (i.e., 1*y'-1*y=e^x; 1 and e^x have an infinite radii of convergence)?

Dick, what method did you use to solve the differential equation? By looking at the equation, I could've guessed y=x*e^x + c, but I can't figure out how to do it with any of the methods we've learned in my intro to DE class.

Dick
Homework Helper
You can't say y has a infinite radius of convergence until you know what y is. x*y'+y=0 has a solution 1/x which is not going to have infinite radius of convergence solutions - even though all coefficients do. And yes, you caught me. I guessed. The homogeneous part is easy enough (it's linear with constant coefficents) - and I always try guessing the inhomogeneous part before going to more general solutions like variation of parameters.

HallsofIvy
Homework Helper
I'm sorry, Dick. Where did you get xy'+ y = 0 ? The given equation is
y'- y= ex which has soluion, as you said, y(x)= Cex+ xex. Wriitten as a power series, that has, of course, radius of convergence infinity- which was what smithg86 said.

I think Dick was using xy' + y = 0 as a counterexample to what I said about guessing about the radius of convergence of the solution based on the coefficients of the original equation. I looked in my textbook, and I found something about the radius of convergence for a 2nd order DE. I was trying to do something similar with this 1st order DE. Here's what my textbook says:

"If $$x_0$$ is an ordinary point of the differential equation:
$$P(x)y'' + Q(x)y' + R(x)y = 0$$
that is, if p=Q/P and q = R/P are analytic at $$x_0$$, then the general solution of the differential equation is y = (summation that I don't want to write out) = $$a_0 y_1 (x) + a_1 y_2 (x)$$. The radius of convergence for each of the series solutions $$y_1$$ and $$y_2$$ is at least as large as the minimum of the radii of convergence of the series for p and q."

Now that I think about it, does the above property not hold for 1st order DE's because P(x)=0, and therefore p and q are not analytic at $$x_0$$?

Last edited:
Dick