<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[a4paper,12pt]{article}
\newcommand{\ds}{\displaystyle}
\newcommand{\pl}{\partial}
\newcommand{\un}{\underline}
\newcommand{\undb}{\underbrace}
\newcommand{\df}{\ds\frac}
\parindent=0pt
\begin{document}


{\bf Question}

Compute the coefficients in the perturbation series solution of
the equation

$$y'=y+\varepsilon xy,\ y(0)=1$$


\vspace{.25in}

{\bf Answer}

$y'=y+\varepsilon xy,\ y(0)=1$

Try $y(x;\varepsilon)=y_0(x)+\varepsilon y_1(x)+O(\varepsilon
^2)=\sum_{n=0}^\infty y_n \varepsilon^n$

Substitute into equation:

$$\ds \sum_{n=0}^\infty (yn' \varepsilon^n-y_n
\varepsilon^n)=\varepsilon\sum_{n=0}^\infty xy_n\varepsilon^n$$

Balance at $O(\varepsilon^n)$:

$\un{n=0}: y_0'-y_0=0 \Rightarrow y_0=Ae^x$

Boundary condition: $y_0(0)=1 \Rightarrow 1=Ae^0 \Rightarrow A=1
\Rightarrow \un{y_0=e^x}$

$n&gt;0: y_n'-y_n=xy_{n-1}$

e.g.,

$\un{n=1}: \begin{array}{rcl} y_1'-y_1 &amp; = &amp; xe^x\\ \Rightarrow
\df{d}{dx}\left(e^{-x}y_1\right) &amp; = &amp; x\\ \Rightarrow e^{-x}y_1 &amp;
= &amp; \df{x^2}{2}+c\\ y_1 &amp; = &amp; \df{x^2}{2}e^x+ce^x \end{array}$

Boundary condition: $y_1(0)=0$

$0=0+ce^x \Rightarrow c=0$

Therefore \un{$y_1=\df{x^2}{2}e^x$}

then $\un{n=2}: \begin{array}{rcl} y_2'-y_2 &amp; = &amp; \df{x^3}{2}e^x\\
\Rightarrow \df{d}{dx}\left(e^{-x}y_2\right) &amp; = &amp; \df{x^3}{2}\\
\Rightarrow e^{-x}y_2 &amp; = &amp; \df{x^4}{8}+c\\ y_2 &amp; = &amp;
\df{x^4}{8}e^x+ce^x \end{array}$

Boundary condition: $y_290)=0 \Rightarrow c=0$

Therefore $y_2=\df{x^4}{8}e^x$

Spot the pattern.

In general:

\begin{eqnarray*} y_n'-y_n &amp; = &amp; \df{x^{2n-1}e^x}{2^{n-1}(n-1)!}\
\ n \geq 1\\ &amp; &amp;  y_n(0)=0\\ \Rightarrow y_n &amp; = &amp;
\df{x^{2n}e^x}{2^n n!}\\ \rm{Therefore}\ y &amp; = &amp; \sum_{n=0}^\infty
\df{\varepsilon^n x^{2n}}{2^n n!} e^x\ \ (\star)\end{eqnarray*}

Compare with \un{exact} solution

$\df{d}{dx}\left(e^{-\int(1+\varepsilon x)\,dx} y\right)=0
\Rightarrow y=ce^{x+\frac{\varepsilon x^2}{2}}$

$y(0)=1 \Rightarrow c=1$

Therefore $y=e^{x+\frac{\varepsilon x^2}{2}}=e^x\sum_{n=0}^\infty
\df{\varepsilon^n x^{2n}}{2^n n!}=(\star)\ \surd\surd$ (Convergent
for all finite $x$)


\end{document}
</pre></body></html>