\documentclass[12pt]{article}

\usepackage[utf8]{inputenc}
\usepackage{latexsym,amsfonts,amssymb,amsthm,amsmath,comment}

\setlength{\parindent}{0in}
\setlength{\oddsidemargin}{0in} 
\setlength{\textwidth}{6.5in} 
\setlength{\textheight}{8.8in} 
\setlength{\topmargin}{0in} \setlength{\headheight}{18pt}

\title{37335 - Differential Equations Assignment}
\author{Zachary Zerafa - 24557656}

\begin{document}

\maketitle

\vspace{0.5in}

\section{Problem 1}

Solve the equation
\[x(1-2x^2 y)y' +y=3x^2 y^2 , \]
$y(1)=\frac{1}{2}$, by setting $y=x^{-2}v$.


\subsection{Substitution}


Employing the substitution $y=x^{-2}v$ and $y'=x^{-2}v' -2x^{-3}v$

\[ [x-2x^{3}(x^{-2}v)](-2x^{-3}v+x^{-2}v')+(x^{-2}v)=3x^{2}(x^{-2}v)^2 \]
\[ (x-2xv)(-2x^{-3}v+x^{-2}v')+(x^{-2}v)=3x^{-2}v^2 \]
\[ (x-2xv)(-2x^{-1}v+v')+v=3v^2 \]
\[ -2v+xv'+4v^2-2xvv'+v=3v^2 \]
\[ -v+xv'+4v^2-2xvv'=3v^2 \]
\[ xv'-2xvv'=-v^2+v \]
\[ xv'(1-2v)=-v^2+v \]
\[ \frac{v'(1-2v)}{-v^2+v}=\frac{1}{x} \]

Hence the ODE is separable by this neat substitution!

\subsubsection{Interesting observation}

$x(-2x^{2}y)y' +y=3x^{2}y^{2}$ can be made made into the exact equations $y'=\frac{3x^{2}y^{2}-y}{x-2x^{3}y}$ or $(2x^{3}y-x)dy+(3x^{2}y^{2}-y)dx=0$
One sets $P(x,y)=f_{x}(x,y)=3x^{2}y^{2}-y$ and $Q(x,y) = f_{y}(x,y) = 2x^{3}y-x $. The potential function is $f(x,y)=x^{3}y^{2}-yx+c$, and hence $x^{3}y^{2}-yx=c$. The quadric formula yields $y(x) =  \frac{1 \pm \sqrt{1+4cx}}{2x^2}$, which is another interesting way to solve this ODE. The main derivation of this ODE will be through making the ODE separable however.


\subsection{Solving first-order separable ODE}

$x$-integrating both sides of the ODE leads to the following (note the subtle use of the reverse chain rule on the LHS to absorb the derivative factor $v'$ and switch the integral to $v$-integration)

\[ \int \frac{1-2v}{-v^2+v} dv = \int \frac{1}{x} dx \]

Resolving the integral produces the following

\[ \ln |v^2 - v| = \ln |x|+c \]
\[ v^2 - v = cx \]
\[ v^2 - v -cx = 0 \]
\[ v =  \frac{1 \pm \sqrt{1+4cx}}{2} \]
Note that the constant 4 can be absorbed into c.
\[ v(x) =  \frac{1 \pm \sqrt{1+cx}}{2} \]
\[ y(x) =  \frac{1 \pm \sqrt{1+cx}}{2x^2} \]


\subsection{Applying initial condition}


Forcing the general solution to fit the initial condition $y(1) = \frac{1}{2}$ produces the following.

\[ \frac{1}{2} =  \frac{1 \pm \sqrt{1+c(1)}}{2(1)^2} \]
\[ \frac{1}{2} =  \frac{1 \pm \sqrt{1+c}}{2} \]
\[ 1 = 1 \pm \sqrt{1+c} \]
\[ 0 = \pm \sqrt{1+c} \]
\[ c = -1 \]

Hence this IVP has the solution below. Note however that the use of the $\pm$ operator in this context means that either $+$ or $-$ can be chosen to obtain a function satisfying the ODE, not in the sense that $y$ has multiple outputs (this violates the definition of a function).

\[ y(x) =  \frac{1 \pm \sqrt{1-x}}{2x^2} \]



\section{Problem 2}

Solve the Riccati equation
\[y' + y^2 = x . \]
You will need Airy's equation.

\subsection{Mapping to Airy equation}
By making the substitution $y(x) = \frac{a(x)u'(x)}{u(x)}$ and $y' = \frac{a'u'}{u} + a\frac{uu'' - u'u'}{u^2}$, the differential equation is transformed to the following and can be simplified as demonstrated.


\[ [\frac{a'u'}{u} + a \frac{uu'' - u'u'}{u^2}] + \frac{a^2 u'u'}{u^2} = x \]

\[ \frac{a'u'}{u} + \frac{a}{u^2} [ uu'' - u'u' + au'u']= x \]

Note that the non-linear terms cancel by setting $a(x)=1$ (hence also setting $a'(x)=0$). Our substitution is therefore $y(x)=\frac{u'(x)}{u(x)}$.


\[ \frac{(0)u'}{u} + \frac{(1)}{u^2} [ uu'' - u'u' + (1)u'u']= x \]
\[ \frac{uu''}{u^2}= x \]
\[ \frac{u''}{u}= x \]
\[ u''= xu \]
\[ u''-xu=0 \]

$u''-xu=0$ is Airy's equation! This may be solved by the series method, however as this is a renown result we omit this tedious process and consider the general solution for $u$ as such.
\[ u(x)=c_1 \text{Ai}(x) + c_2 \text{Bi}(x) \]

\subsection{Undoing the substitution}
Recalling that the substitution $y(x) = \frac{u'(x)}{u(x)}$ was used to map the ODE to the Airy equation, this intermediate function is now substituted to find the general solution to the original problem.
\[ y(x)= \frac{c_1 \text{Ai}'(x) + c_2 \text{Bi}'(x)}{c_1 \text{Ai}(x) + c_2 \text{Bi}(x)} \]



\section{Problem 3}

Use Variation of parameters to solve
\[x^2 y'' + 4xy' - 10y = x^3 \sin x .\]



\subsection{Solving homogeneous equation by the method of Frobenius}


\subsubsection{Substituting Frobenius power series}

One considers the homogeneous differential equation $x^{2}y'' + 4xy' - 10y =0$ and applies the method of Frobenius by substituting $y_1 (x) = \sum^{\infty}_{n=0} a_n x^{n+s}$.

\[ x^2 [\sum^{\infty}_{n=0} a_n (n+s)(n+s-1) x^{n+s-2}] + 4x[ \sum^{\infty}_{n=0} a_n (n+s) x^{n+s-1} ]  - 10 [ \sum^{\infty}_{n=0} a_n x^{n+s} ] = 0 \]

\[ \sum^{\infty}_{n=0} a_n (n+s)(n+s-1) x^{n+s}] + 4[ \sum^{\infty}_{n=0} a_n (n+s) x^{n+s} ]  - 10 [ \sum^{\infty}_{n=0} a_n x^{n+s} ] = 0 \]
\[ [\sum^{\infty}_{n=0} [ a_n (n+s)(n+s-1) + 4 a_n (n+s) - 10 a_n ] x^{n+s} = 0 \]
\[ \sum^{\infty}_{n=0} a_n [ (n+s)(n+s-1)+4(n+s) -10 ] x^{n+s}=0 \]
\[ a_n [(n+s)(n+s-1)+4(n+s)-10]=0 \]


\subsubsection{Calculating $s$}


Since the trivial solution is to be avoided, we assume that $a_0 \neq 0$ and hence one aims to extract the first term out of the series, equate it to 0, and ignores any contibution from $a_0$.

\[ a_0 [s(s-1)+4s-10]x^{s-2}+\sum^{\infty}_{n=0} a_n [ (n+s)(n+s-1)+4(n+s) -10 ]=0 \]

Hence $s(s-1)+4s-10=0$ and by solving the quadratic it follows that $s=-5,2$.
\[ s^2 - 3s -10=0 \]
\[ (s+5)(s-2)=0 \]
\[ s = -5,2 \]


\subsubsection{Calculating $(a_n)$}


Taking $s=-5$ and equating the coefficents to 0 implies the following
\[ a_n [(n-5)(n-6)+4(n-5)-10]=0 \]
\[ a_n [n^2 - 7n]=0 \]

Note that the only value of $n$ such that  $n^2 - 7 = 0$ is $n=7$; so we have deduced that $(\forall n \in \mathbb{N} n \neq 7 \implies a_n=0)$. Considering our Frobenius power series, all the terms of $(a_n)$ zero out except for the 7th term, hence one has  $y_1(x) = a_7 x^{7-5} = a_7 x^2$.

Now disregarding the scaling factor $a_7$ our solution is reduced to $y_1 (x) = x^2$.


\subsubsection{Calculating linearly independent solution}

To avoid laborious expansions of more Frobenius power series, we employ a well-known corollary of the Abel identity to locate a linearly independent solution.
\[ y_2 (x) = (x^2) \int \frac{e^{-\int (\frac{4}{x}) dx}}{(x^2)^2} dx \]
\[ = x^2 \int \frac{x^{-4}}{x^4} dx \]
\[ = x^2 \int x^{-8} dx \]
\[ = x^2 (-\frac{x^{-7}}{7}) \]
\[ = -\frac{1}{7}x^{-5}  \]

Hence by disregarding the scaling factor, one reasons that $y_2 (x) = x^{-5}$.
Now the solutions $y_1 (x) = x^{2}$ and $y_2 (x) = x^{-5}$ for the homogeneous equation have been deduced!

\[ y_c (x) = c_1 x^2 + c_2 x^{-5} \]

\subsection{Variation of Parameters}

Thus one now employs VOP to obtain a solution to the inhomogeneous $x^{2}y'' + 4xy' - 10y =x^{3} \sin x$ (we will need this in the standar form $y'' + \frac{4}{x}y' - \frac{10}{x^2}y =x \sin x$), however the second-order linear shortcut of making the ansatz $y(x) = u(x)y_1 (x) + v(x) y_2 (x)$
leads one to the following set of equations
\[ u(x) = -\int \frac{x^{-5} x \sin x }{W(y_1 , y_2)} dx \]
\[ v(x) = \int \frac{x^{-2} x \sin x }{W(y_1 , y_2)} dx \]

, or better yet,


\[ \displaystyle u(x) = -\int \frac{x^{-4} \sin x }{W(y_1 , y_2)} dx \]
\[ v(x) = \int \frac{x^{-1} \sin x }{W(y_1 , y_2)} dx \]

One calculates the Wronskian as $W(y_1, y_2) = y_1 y'_2 - y_2 y'_1 = (x^{2})(-5x^{-6}) - (x^{-5})(2x) = -5x^{-4}-2x^{-4} = -7x^{-4}$.

\[ u(x) = -\int \frac{x^{-5} x \sin x }{-7x^{-4}} dx \]
\[ v(x) = \int \frac{x^{2} x \sin x }{-7x^{-4}} dx \]

, or better yet,

\[ u(x) = \frac{1}{7}\int \sin x dx \]
\[ v(x) = -\frac{1}{7}\int x^{7} \sin x dx \]

Noting that the sequence of functions $I_n = \int x^n \sin x dx $ follows the following recurrence relation.
\[ I_n = \begin{cases} - \cos x & n = 0 \\ -x \cos x + \sin x & n = 1 \\ -x^{n} \cos x + n x^{n-1} \sin x - n(n-1) S_{n-2} & n \in \mathbb{N} \cap [2,\infty) \end{cases}\]

By evaluating $I_0$ and $I_7$, the following results are derived
\[ u(x) = -\frac{\cos x}{7}\]
\[ v(x) = \frac{1}{7}(x^7 - 42x^5 + 840x^3 - 5040x)\cos x - (x^6 - 30x^4 + 360x^2 - 720)\sin x \]

Variation of Parameters claims that the particular solution of the ODE has the form
\[ y_p (x) = u(x)y_1 (x) + v(x) y_2 (x) \]

Hence by substituting the calculated functions, one has the following function that barely fits on the page.

\[ y_p (x) = [ -\frac{\cos x}{7} ][x^2]+ [ \frac{1}{7}(x^7 - 42x^5 + 840x^3 - 5040x)\cos x - (x^6 - 30x^4 + 360x^2 - 720)\sin x ][x^{-5}] \]


\subsection{Linear combination of homogeneous and inhomogeneous solutions}

\[ y (x) = y_c (x) + y_p (x) \]
\[ y (x) =  c_1 x^2 + c_2 x^{-5} + [ -\frac{\cos x}{7} ][x^2]+ [ \frac{1}{7}(x^7 - 42x^5 + 840x^3 - 5040x)\cos x - (x^6 - 30x^4 + 360x^2 - 720)\sin x ][x^{-5}] \]

\[ y (x) =  ( c_1 - \frac{\cos x}{7} )x^2+ (c_2 + \frac{1}{7}(x^7 - 42x^5 + 840x^3 - 5040x)\cos x - (x^6 - 30x^4 + 360x^2 - 720)\sin x )x^{-5} \]

\section{Problem 4}


Let $p,q$ be analytic on the interval $I=(-a,a),a > 0$. Show that the IVP
\[y''(x) + p(x)y'(x)+q(x)y(x)=0\],
$y(0)=y'(0)=0$ has $y=0$ as a solution. Prove that this is the only solution on $I$.


\subsection{$y(x)=0$ is a solution to the IVP}

Define $y(x)=0$, to prove that it is a solution to the IVP, one must verify that it meets the initial conditions and that it satisfies the ODE.

\subsubsection{Checking initial conditions}

Since the function 0 and its first derivative are the following.
\[ y(x)=0 \]
\[ y'(x)=0 \]
it is certainly true that $y(0)=y'(0)=0$.

\subsubsection{Substitution into the ODE}

Now what remains is substitution into the differential equation. Noting that the following are 0 and its first two derivatives.
\[ y(x)=0 \]
\[ y'(x)=0 \]
\[ y''(x)=0 \]
substitution into the ODE indeed returns 0.
\[ (0)+p(x)(0)+q(x)(0) =0+0+0 =0\]


\subsection{Uniqueness of trivial solution on $I$}

Since the coefficients are analytic on $I$, it is known that solutions of this IVP must be analytic $I$, so the a power series expanded upon $0$ (since $0 \in I$) detects all functions that satisfy the ODE on $I$. $y(x)=0$ is the unique solution if this power series sequence is the zero sequence; this will be proven by strong induction. The base cases $a_0,a_1$ shall be manually calculated and shown to be 0, then under the inductive hypothesis $a_{n},a_{n-1}$ are assumed to be 0, and then $a_{n+1}$ must be shown to equal 0 under the inductive hypothesis.





\subsubsection{Base cases}

The initial conditions of $y$ allow one to see that the first two terms of the Frobenius power series equal 0.

When evaluating $f(x)=\sum^{\infty}_{n=0} a_n x^n$ at $0$, one has $f(0)=a_0$. This is because $\lim_{x \to 0} x^0 = 1$ and $n > 0 \implies \lim_{x \to 0} x^n = 0$. Similarly, $g(x)=\sum^{\infty}_{n=1} a_n n x^{n-1} = \sum^{\infty}_{n=0} a_{n+1} (n+1) x^{n} $ and by the same reasoning $g(0)=(0+1) a_{0+1}=a_{1}$.

\[ y(0)=0 \implies \sum^{\infty}_{n=0}a_n (0)^n = 0 \implies a_0 = 0 \]
\[ y'(0)=0 \implies \sum^{\infty}_{n=1}a_n n (0)^{n-1} = 0 \implies a_1 = 0 \]

\subsubsection{Hypothesis cases}

By the hypothesis of strong induction with two base cases, the subsequent argument follows
\[ a_n = a_{n-1} = 0\]

Now there remains to show that $\forall n \geq 0 (a_n = 0)$; 

\subsubsection{Inductive case}

Now it must be proven that $a_{n+1}=0$. This can be done by leveraging the inductive hypothesis and the closed form for the power series sequence as such.


\[ [\sum^{\infty}_{n=2} n(n-1) a_n x^{n-2} ] + p(x)[ \sum^{\infty}_{n=1} a_n n x^{n-1}] + q(x) [ \sum^{\infty}_{n=0} a_n x^n ] = 0 \]
\[ \sum^{\infty}_{n=2} n(n-1) a_n x^{n-2} + \sum^{\infty}_{n=2} a_{n-1} (n-1) p(x)x^{n-2} + \sum^{\infty}_{n=2} a_{n-2} q(x) x^{n-2} = 0 \]
\[ \sum^{\infty}_{n=2} [n(n-1) a_n + a_{n-1} (n-1) p(x) + a_{n-2} q(x)] x^{n-2} = 0 \]
\[ n(n-1) a_n + a_{n-1} (n-1) p(x) + a_{n-2} q(x) = 0 \]
\[ a_n = -\frac{a_{n-1} (n-1) p(x) + a_{n-2} q(x)}{n(n-1)} \]


Now that a recursive form for $(a_n)$ is known, sufficient background is achieved to finish the inductive proof.
\[ a_n = -\frac{a_{n-1} (n-1) p(x) + a_{n-2} q(x)}{n(n-1)} \]
\[ a_{n+1} = -\frac{a_{n} n p(x) + a_{n-1} q(x)}{n(n+1)} \]
\[ a_{n+1} = -\frac{(0) n p(x) + (0) q(x)}{n(n+1)} \]
\[ a_{n+1}=0 \]

Therefore by strong induction, we have proven that $\forall n \geq 0 ( a_n = 0)$.

\[y(x) = \sum^{\infty}_{n=0} a_n x^n = \sum^{\infty}_{n=0} (0) x^n = 0 \]




\section{Problem 5}

Solve the ODE
\[x^2 y'' + x(2x-3)y' + 4y=0 , \]
by the method of Frobenius.


\subsection{Substituting Frobenius power series}


Consider the ODE in its standard form \[ y'' + \frac{2x-3}{x} y' + \frac{4}{x^2}y=0 \]. Since there exists a singularity at $x=0$, one employs the Frobenius method by making the ansatz $y(x) = \sum^{\infty}_{n=0} a_n x^{n+s}$.

\[  x^2 [ \sum^{\infty}_{n=0} a_n (n+s)(n+s-1)x^{n+s-2} ] + x(2x-3) [ \sum^{\infty}_{n=0} a_n (n+s) x^{n+s-1} ]  + 4 [ \sum^{\infty}_{n=0} a_n x^{n+s}  ] = 0 \]
\[   \sum^{\infty}_{n=0} a_n (n+s)(n+s-1)x^{n+s}  + (2x-3)  \sum^{\infty}_{n=0} a_n (n+s) x^{n+s}  + 4 \sum^{\infty}_{n=0} a_n x^{n+s}  = 0 \]
\[   \sum^{\infty}_{n=0} a_n [(n+s)(n+s-1)+4]x^{n+s}  + (2x-3)  \sum^{\infty}_{n=0} a_n (n+s) x^{n+s} = 0 \]
\[   \sum^{\infty}_{n=0} a_n [(n+s)(n+s-1)+4-3(n+s)]x^{n+s}  + 2x \sum^{\infty}_{n=0} a_n (n+s) x^{n+s} = 0 \]
\[   \sum^{\infty}_{n=0} a_n [(n+s)(n+s-4)+4]x^{n+s}  + 2\sum^{\infty}_{n=0} a_n (n+s) x^{n+s+1} = 0 \]
\[   \sum^{\infty}_{n=0} a_n [(n+s)(n+s-4)+4]x^{n+s}  + \sum^{\infty}_{n=1} 2 a_{n-1} (n+s-1) x^{n+s} = 0 \]
\[   \sum^{\infty}_{n=0} a_n [(n+s)(n+s-4)+4]x^{n+s}  + \sum^{\infty}_{n=1} 2 a_{n-1} (n+s-1) x^{n+s} = 0 \]
\[   a_0 [s(s-4)+4]x^{s} + \sum^{\infty}_{n=1} a_n [(n+s)(n+s-4)+4]x^{n+s}  + \sum^{\infty}_{n=1} 2 a_{n-1} (n+s-1) x^{n+s} = 0 \]
\[   a_0 [s(s-4)+4]x^{s} + \sum^{\infty}_{n=1} [ a_n [(n+s)(n+s-4)+4] +2a_{n-1}(n+s-1) ] x^{n+s} = 0 \]

\begin{comment}
\[  [ \sum^{\infty}_{n=0} a_n (n+s)(n+s-1)x^{n+s-2} ] + \frac{2x-3}{x} [ \sum^{\infty}_{n=0} a_n (n+s) x^{n+s-1} ]  + \frac{4}{x^2}  [ \sum^{\infty}_{n=0} a_n x^{n+s}  ] = 0 \]

\[  \sum^{\infty}_{n=0} a_n (n+s)(n+s-1)x^{n+s-2} + (2x-3) \sum^{\infty}_{n=0} a_n (n+s) x^{n+s-2} + 4  \sum^{\infty}_{n=0} a_n x^{n+s-2}   = 0 \]

\[ \sum^{\infty}_{n=0} x^{n+s-2} [ a_n (n+s)(n+s-1) + (2x-3) a_n (n+s) + 4a_n]   = 0 \]

\[ \sum^{\infty}_{n=0} x^{n+s-2} [ a_n (n+s)(n+s-4) + 2x a_n (n+s) + 4a_n]   = 0 \]
\[ \sum^{\infty}_{n=0} x^{n+s-2} [ a_n (n+s)(n+s-4) + 4a_n] + \sum^{\infty}_{n=0} 2x a_n (n+s)   = 0 \]
\[ \sum^{\infty}_{n=0} x^{n+s-2} [ a_n (n+s)(n+s-4) + 4a_n] + \sum^{\infty}_{n=0} 2x a_n (n+s)x^{n+s-2}   = 0 \]
\[ \sum^{\infty}_{n=0} x^{n+s-2} [ a_n (n+s)(n+s-4) + 4a_n] + \sum^{\infty}_{n=0} 2 a_n (n+s)x^{n+s-1}   = 0 \]
\[ \sum^{\infty}_{n=0} x^{n+s-2} [ a_n (n+s)(n+s-4) + 4a_n] + \sum^{\infty}_{n=1} 2 a_{n-1} (n+s-1)x^{n+s-2}   = 0 \]

We can allow $\forall n < 0 ( a_n =0)$ to do the following.

\[ \sum^{\infty}_{n=0} x^{n+s-2} [ a_n (n+s)(n+s-4) + 4a_n] + \sum^{\infty}_{n=0} 2 a_{n-1} (n+s-1)x^{n+s-2}   = 0 \]
\[ \sum^{\infty}_{n=0} x^{n+s-2} [ a_n (n+s)(n+s-4) + 4a_n + 2 a_{n-1} (n+s-1)] = 0 \]

\[ \sum^{\infty}_{n=0} [a_n [4+(n+s)(n+s-4)]+2a_{n-1}(n+s-1)]x^{n+s-2} = 0\]
\end{comment}

As a preliminary note, by equating the coefficients to 0 one has the following $\forall n \geq 1$.
\[ a_n [4+(n+s)(n+s-4)]+2a_{n-1}(n+s-1)=0 \]
\[ a_n =-\frac{2a_{n-1}(n+s-1)}{4+(n+s)(n+s-4)} \]
This will prove useful in future when deriving a second linearly independent solution.

\subsection{Calculating $s$}

Now one equates the coefficiets to 0 to solve for $s$; we look at the first term. Since we disallow $a_0 =0$ to avoid the trivial solution, Solving $4+s(s-4)=0$ implies that $s=2$ (a root of double multiplicity, which will come to haunt us later).
\[ a_0 [s(s-4) +4] =0 \]
\[ s^2-4s+4 =0 \]
\[ (s-2)^2] =0 \]
\[ s = 2 \]


\subsection{Calculating $(a_n)$}

Recall the preliminary note that holds $\forall n \geq 1$.
\[ a_n =-\frac{2a_{n-1}(n+s-1)}{4+(n+s)(n+s-4)} \]
Making the substitution $s=2$ leads to the following.
\[ a_n =-\frac{2a_{n-1}(n+1)}{4+(n+2)(n-2)} \]
\[ a_n =-\frac{2a_{n-1}(n+1)}{n^2} \]
Then solving for closed form produces the following result.
\[ a_n = a_0 \frac{(-2)^n (n+1)}{n!} \]

Hence by setting $s=2$, subsituting the power series sequence with its closed form and dividing out the scaling constant $a_0$, one has
\[ y_1(x) = x^2 + x^2 \sum^{\infty}_{n=1}\frac{(-2)^n (n+1)}{n!}x^n \]

Considerable simplification of this function can be made to reduce it to an elementary form!

\[ y_1(x) = x^2 + x^2 \sum^{\infty}_{n=1}\frac{(-2)^n (n+1)}{n!}x^n \]

\[ y_1(x) = x^2 + x^2 [ \sum^{\infty}_{n=1}\frac{(-2x)^n}{n!} + \sum^{\infty}_{n=1}\frac{n(-2x)^n}{n!} ] \]

\[ y_1(x) = x^2 + x^2 [(e^{-2x} -1) + \sum^{\infty}_{n=1}\frac{n(-2x)^n}{n!}] \]

\[ y_1(x) = x^2 + x^2 [(e^{-2x} -1) + \sum^{\infty}_{n=1}\frac{(-2x)^n}{(n-1)!}] \]


\[ y_1(x) = x^2 + x^2 [(e^{-2x} -1) -2x\sum^{\infty}_{n=1}\frac{(-2x)^{n-1}}{(n-1)!}] \]

\[ y_1(x) = x^2 + x^2 [(e^{-2x} -1) -2x(e^{-2x})] \]

\[ y_1(x) = x^2 + x^2 [e^{-2x} -1 -2xe^{-2x}] \]

\[ y_1(x) = x^2 (e^{-2x} -2xe^{-2x}) \]

\[ y_1(x) = x^2 e^{-2x} (1-2x) \]


\subsection{Calculating linearly independent Frobenius power series}

To find a second linearly independent solution in the case of only one $s$, the following formula is used.

\[ y_2(x) = y_1 (x) \ln (x) + x^{s} \sum^{\infty}_{n=1} a'_{n}(s)x^n\]

\subsubsection{$s$-Differentiating $a_n$}

It will be necessary to $s$-differentiate $a_n$, hence we shall recall the preliminary result from earlier as a starting point.

\[ a_n (s) =-\frac{2a_{n-1}(n+s-1)}{4+(n+s)(n+s-4)} \]
\[ a_n (s) =\frac{(-2)^n   \prod^{n}_{k=1} (k+s-1) }{\prod^{n}_{k=1}  [4+(k+s)(k+s-4)]} a_0 \]
\[ \ln |a_n (s)| = \ln | (-2)^n  a_0 \prod^{n}_{k=1} (k+s-1) | - \ln | \prod^{n}_{k=1}  [4+(k+s)(k+s-4)] | \]
\[ \ln |a_n (s)| = \ln | a_0 | + n \ln |-2| + \sum^{n}_{k=1} \ln |k+s-1|  - \sum^{n}_{k=1} \ln |4+(k+s)(k+s-4)| \]
\[ \frac{a'_n (s) }{a_n (s)} = \sum^{n}_{k=1} \frac{1}{k+s-1}  - \sum^{n}_{k=1} \frac{2s+2k-4}{4+(k+s)(k+s-4)}  \]
\[ a'_n (s) = (\frac{(-2)^n   \prod^{n}_{k=1} (k+s-1) }{\prod^{n}_{k=1}  [4+(k+s)(k+s-4)]} a_0)(\sum^{n}_{k=1} \frac{1}{k+s-1}  - \sum^{n}_{k=1} \frac{2s+2k-4}{4+(k+s)(k+s-4)}) \]

Now this function is evaluated at the double root $2$.

\[ a'_n (2) = (\frac{(-2)^n (n+1)!}{(n!)^2}a_0) (\sum^{n}_{k=1} \frac{1}{k+1}  - \sum^{n}_{k=1} \frac{2k}{4+(k+2)(k-2)}) \]
\[ a'_n (2) = (\frac{(-2)^n (n+1)!}{(n!)^2}a_0) (\sum^{n}_{k=1} \frac{1}{k+1}  - 2\sum^{n}_{k=1} \frac{k}{k^2}) \]
\[ a'_n (2) = (\frac{(-2)^n (n+1)}{n!}a_0) (\sum^{n+1}_{k=2} \frac{1}{k}  - 2\sum^{n}_{k=1} \frac{1}{k}) \]
\[ a'_n (2) = a_0 \frac{(-2)^n (n+1)(H_{n+1} -1 - 2H_{n})}{n!}  \]


\subsubsection{Applying the formula}

A simple application of the aforementioned formula produces the desired result.
\[ y_2 (x) =  [ x^2 e^{-2x} (1-2x)] \ln (x) + a_0 \sum^{\infty}_{n=1} \frac{(-2)^n (n+1)(H_{n} -1 - 2H_{n})}{n!}x^{n+2} \]


\subsection{Linear combination of linearly independent solutions}

Indeed, $y(x)=c_1 y_1 (x) + c_2 y_2 (x)$, so therefore the following is the general solution.

\[ y (x) = c_1 [ x^2 e^{-2x} (1-2x)] +  c_2[ [ x^2 e^{-2x} (1-2x)] \ln (x) + a_0 \sum^{\infty}_{n=1} \frac{(-2)^n (n+1)(H_{n} -1 - 2H_{n})}{n!}x^{n+2} ] \]


\end{document}
