DiffEq Home

## General Solutions

Consider the linear homogeneous $$n$$th order ODE $y^{(n)}+p_1(x)y^{(n-1)}+p_2(x)y^{(n-2)}+\cdots+p_n(x)y=0. \;\;\;\;(43)$ Principle of superposition: If $$y_1,y_2,\ldots,y_n$$ are solutions of (43), then $$c_1y_1+c_2y_2+\cdots+c_ny_n$$ is also a solution of (43). (verify)

Theorem. If $$y_1,y_2,\ldots,y_n$$ are linearly independent solutions of (43), i.e., $$W(y_1,\,y_2,\ldots,y_n)\neq 0$$, then the general solution of (43) is $y=c_1y_1+c_2y_2+\cdots+c_ny_n,$ for arbitrary constants $$c_1,\ldots,c_n$$. Any $$n$$ linearly independent solutions of (43) are called fundamental solutions of (43) because any solution of (43) is a linear combination of them. Note the general formula for Wronskian: $W(y_1,\,y_2,\ldots,y_n)=\,\begin{array}{|llcl|} y_1& y_2& \cdots& y_n\\ y_1'& y_2'& \cdots& y_n'\\ \vdots& \vdots& \cdots& \vdots\\ y_1^{(n-1)}& y_2^{(n-1)}& \cdots& y_n^{(n-1)}\end{array}\,.$
Example. Show that $$e^x,\cos x$$, and $$\sin x$$ are linearly independent functions.

Solution. \begin{align*} W(e^x,\cos x,\sin x) &= \,\begin{array}{|ccc|} e^x & \cos x & \sin x\\ (e^x)' & (\cos x)' & (\sin x)'\\ (e^x)'' & (\cos x)'' & (\sin x)'' \end{array} \\ &= \,\begin{array}{|ccc|} e^x & \cos x & \sin x\\ e^x & -\sin x & \cos x\\ e^x & -\cos x & -\sin x \end{array} \\ &= e^x\, \begin{array}{|cc|} -\sin x & \cos x\\ -\cos x & -\sin x\end{array} -\cos x\,\begin{array}{|cc|} e^x & \cos x\\ e^x & -\sin x\end{array} +\sin x\,\begin{array}{|ccc|} e^x & -\sin x \\ e^x & -\cos x \end{array} \\ &= e^x(\sin^2x+\cos^2x)-\cos x(-e^x\sin x-e^x\cos x) +\sin x(-e^x\cos x+e^x\sin x) \\ &= e^x(\sin^2x+\cos^2x)+e^x(\sin^2x+\cos^2x)\\ &= 2e^x \neq 0. \end{align*} Since $$W(e^x,\cos x,\sin x)\neq 0$$, $$e^x,\cos x$$, and $$\sin x$$ are linearly independent functions.

Consider the linear nonhomogeneous $$n$$th order ODE $y^{(n)}+p_1(x)y^{(n-1)}+p_2(x)y^{(n-2)}+\cdots+p_n(x)y=g(x). \;\;\;\;(44)$
Theorem. If $$y_1,y_2,\ldots,y_n$$ are fundamental solutions of the corresponding homogeneous ODE of (44) and $$y_p$$ is a particular solution of (44), then the general solution of (44) is $y=c_1y_1+c_2y_2+\cdots+c_ny_n+y_p,$ for arbitrary constants $$c_1,\ldots,c_n$$.

Consider the IVP \begin{align} y^{(n)}+p_1(x)y^{(n-1)}+p_2(x)y^{(n-2)}+\cdots+p_n(x)y&=g(x) \nonumber\\ y(x_0)=a_0,y'(x_0)=a_1,\ldots,y^{(n-1)}(x_0)&=a_{n-1}. \;\;\;\;(45) \end{align} Theorem. If $$p_1,p_2,\ldots,p_n$$, and $$g$$ are continuous functions on an interval containing $$x_0$$, then the ODE (45) has a unique solution $$y=\phi(x)$$ on interval containing $$x_0$$.

Consider the linear homogeneous $$n$$th order ODE with constant coefficients $y^{(n)}+a_1y^{(n-1)}+a_2y^{(n-2)}+\cdots+a_ny=0. \;\;\;\;(46)$ The characteristic equation of (46) is $r^n+a_1r^{n-1}+\cdots+a_n=0.$

• If $$r_1,r_1,\ldots,r_1$$ are $$k$$ characteristic roots, then $e^{r_1x},xe^{r_1x},\ldots,x^{k-1}e^{r_1x}$ are $$k$$ linearly independent solutions of (46).

• If $$r\pm i\theta,r\pm i\theta,\ldots,r\pm i\theta$$ are $$k$$ pairs of characteristic roots, then $e^{rx}\cos(\theta x),e^{rx}\sin(\theta x);xe^{rx}\cos(\theta x),xe^{rx}\sin(\theta x);\ldots;x^{k-1}e^{rx}\cos(\theta x),x^{k-1}e^{rx}\sin(\theta x)$ are $$k$$ pairs of linearly independent solutions of (46).

Example. Solve the IVP \begin{align*} y'''-2y''+y'-2y&=0\\ y(0)=3,y'(0)=3,y''(0)&=7. \end{align*} Solution. The characteristic equation is \begin{align*} r^3-2r^2+r-2&=0\\ r^2(r-2)+(r-2)&=0\\ (r-2)(r^2+1)&=0\\ r&=2,\pm i. \end{align*} So the general solution is $y=c_1e^{2x}+c_2\cos x+c_3\sin x.$ Taking derivatives we get \begin{align*} y'&=2c_1e^{2x}-c_2\sin x+c_3\cos x\\ y''&=4c_1e^{2x}-c_2\cos x-c_3\sin x. \end{align*} Using the initial conditions $$y(0)=3,y'(0)=3,y''(0)=7$$, we get \begin{align*} c_1+c_2 &=3\\ 2c_1 +c_3&=3\\ 4c_1-c_2 &=7. \end{align*} Solving we get $$c_1=2, c_2=1, c_3=-1$$. Thus the solution is $y=2e^{2x}+\cos x-\sin x.$
Example. Find the general solution of \begin{align*} (D-2)^3(D^2-2D+2)^2y&=0. \end{align*} Here the differential operator $$D$$ is defined as $$D^ky=\displaystyle\frac{d^ky}{dx^k}$$.

Solution. The characteristic equation is \begin{align*} (r-2)^3(r^2-2r+2)^2&=0\\ r&=2,2,2,1\pm i,1\pm i. \end{align*} So the general solution is $y=c_1e^{2x}+c_2xe^{2x}+c_3x^2e^{2x}+c_4e^x\cos x+c_5e^x\sin x+c_6xe^x\cos x+c_7xe^x\sin x.$

Last edited