- Find solutions of the following ODE problems including their domains:
(a)$\frac{\mathrm dy}{\mathrm dx}+xy=x,\quad y(0)=0$
(b)$2 x^3\frac{\mathrm dy}{\mathrm dx}-3 x^{2} y=1,\quad y(1)=0$
(c)$\frac{\mathrm dy}{\mathrm dx}-y\tan x=1,\quad y(0)=1$
Solution.
(a)Multiplying $e^{\frac{x^2}2}$, $\frac{\mathrm d}{\mathrm dx}(ye^{\frac{x^2}2})=xe^{\frac{x^2}2}$, integrating, $y=1+Ce^{-\frac{x^2}2}$. From $y(0)=0$, $C=-1$, so $y=1-e^{-\frac{x^2}2}$. Domain: $\mathbb R$.
(b)$\frac{\mathrm dy}{\mathrm dx}-\frac32x^{-1}y=\frac12x^{-3}$. Multiplying $x^{-\frac32}$, $\frac{\mathrm d}{\mathrm dx}(yx^{-\frac32})=\frac12x^{-\frac92}$, integrating, $y=-\frac17x^{-2}+Cx^{\frac32}$. From $y(1)=0$, $C=\frac17$, so $y=\frac17(-x^{-2}+x^{\frac32})$. Domain: $\mathbb R^+$.
(c)Multiplying $\cos x$, $\frac{\mathrm d}{\mathrm dx}(y\cos x)=\cos x$, integrating, $y=\tan x+C\sec x$. From $y(0)=1$, $C=1$, so $y=\tan x+\sec x$. Domain: $\left(-\frac\pi2,\frac\pi2\right)$. - Solve the following differential equations:
(a)$\left(1-x^2\right) \frac{\mathrm{d} y}{\mathrm{d} x}+2 x y=\left(1-x^{2}\right)^{3 / 2}$
(b)$\frac{\mathrm{d} y}{\mathrm{d} x}-(\cot x) y+\csc x=0$
Solution.
(a)$\frac{\mathrm{d} y}{\mathrm{d} x}+\frac{2 x y}{1-x^2}=\left(1-x^{2}\right)^{1 / 2}$. Multiplying $(1-x^2)^{-1}$, $\frac{\mathrm d}{\mathrm{d} x}(y(1-x^2)^{-1})=\left(1-x^{2}\right)^{-1 / 2}$, integrating, $y=(1-x^2)(\arcsin x+C)$. Domain: $[-1,1]$.
(b)Multiplying $\csc x$, $\frac{\mathrm d}{\mathrm dx}\left(y\csc x\right)=-\csc^2x$, integrating, $y=\sin x(\cot x+C)=\cos x+C\sin x$. - By treating $y$ as the independent variable, or otherwise, find the implicit solution and the domain of $y(x)$ where $\left(x+y^{3}\right) \frac{\mathrm{d} y}{\mathrm{d} x}=y, \quad y(1)=2$.
Solution.
$\frac{\mathrm{d} x}{\mathrm{d} y}-\frac{x}y=y^{2}$, multiplying $y^{-1}$, $\frac{\mathrm d}{\mathrm dy}(xy^{-1})=y$, $x=Cy+\frac{y^3}2$. From $y(1)=2$, $C=-\frac32$, so $x=-\frac32y+\frac{y^3}2$.
For each $x$, there is one value of $y$ if $x<-1$ or $x>1$ and three values of $y$ if $-1<x<1$, so the domain is $x\ge-1$. (so $y>0$)
Note. To divide the equation by $y$ we need $y\ne0$, $y=0$ satisfies the ODE but not the initial condition $y(1)=2$, so we can assume $y\ne0$. - Find the general solutions of the following homogeneous linear equations:
(a)$\frac{\mathrm{d}^{2} y}{\mathrm{d} x^{2}}-y=0$
(b)$\frac{\mathrm{d}^{2} y}{\mathrm{d} x^{2}}+4 y=0$
(c)$\frac{\mathrm{d}^{2} y}{\mathrm{d} x^{2}}+3 \frac{\mathrm{d} y}{\mathrm{d} x}+2 y=0$
(d)$\frac{\mathrm{d}^{2} y}{\mathrm{d} x^{2}}+2 \frac{\mathrm{d} y}{\mathrm{d} x}+3 y=0$
(e)$\frac{\mathrm{d}^{3} y}{\mathrm{d} x^{3}}+\frac{\mathrm{d}^{2} y}{\mathrm{d} x^{2}}+\frac{\mathrm{d} y}{\mathrm{~d} x}+y=0$
(f)$\frac{\mathrm{d}^{4} y}{\mathrm{d} x^{4}}+\frac{\mathrm{d}^{2} y}{\mathrm{d} x^{2}}=0$
Solution.
(a)$m^2-1=0\Rightarrow m=\pm1$. So $y=Ae^x+Be^{-x}$.
(b)$m^2+4=0\Rightarrow m=\pm2i$. So $y=A\cos{2x}+B\sin{2x}$.
(c)$m^2+3m+2=0\Rightarrow m=-1,-2$. So $y=Ae^{-x}+Be^{-2x}$.
(d)$m^2+2m+3=0\Rightarrow m=-1\pm\sqrt2i$. So $y=e^{-x}(A\cos\sqrt2x+B\sin\sqrt2x)$.
(e)$\frac{\mathrm dy}{\mathrm dx}+y=A\cos x+B\sin x$, multiplying $e^x$, $\frac{\mathrm d}{\mathrm dx}(ye^x)=A\cos x+B\sin x$, integrating, $y=e^{-x}(A\cos x+B\sin x+C)$.
(f)$\frac{\mathrm d^2y}{\mathrm dx^2}=A\cos x+B\sin x\Rightarrow y=A\cos x+B\sin x+Cx+D$. - By using the substitution $z =\ln x$, or otherwise, find the solution of the boundary value problem
$x^{2} \frac{\mathrm{d}^{2} y}{\mathrm{d} x^{2}}+x \frac{\mathrm{d} y}{\mathrm{d} x}+y=0 \quad y(1)=0, \quad y(e)=1$
Solution.
Using $\frac{\mathrm dy}{\mathrm dx}=\frac{\mathrm dy}{\mathrm dz}\frac{\mathrm dz}{\mathrm dx}=\frac1x\frac{\mathrm dy}{\mathrm dz},\frac{\mathrm d^2y}{\mathrm dx^2}=-\frac1{x^2}\frac{\mathrm dy}{\mathrm dz}+\frac1{x^2}\frac{\mathrm d^2y}{\mathrm dz^2}$, we get $\frac{\mathrm d^2y}{\mathrm dz^2}+y=0\Rightarrow y=A\cos z+B\sin z$. From $y(1)=0,y(e)=1$, we get $A=0,B=\csc1$. So $y=(\csc1)\sin\ln x$. - Find the general solutions of the following inhomogeneous equations:
(a)$\frac{\mathrm{d}^{2} y}{\mathrm{d} x^{2}}+3 \frac{\mathrm{d} y}{\mathrm{d} x}+2 y=4 e^{3 x}+2 \sin x$
(b)$\frac{\mathrm{d}^{2} y}{\mathrm{d} x^{2}}+2 \frac{\mathrm{d} y}{\mathrm{d} x}+3 y=x^{2}+2$
Solution.
(a)For $y=e^x$, $\frac{\mathrm{d}^{2} y}{\mathrm{d} x^{2}}+3 \frac{\mathrm{d} y}{\mathrm{d} x}+2 y=6e^x$.
For $y=\cos x$, $\frac{\mathrm{d}^{2} y}{\mathrm{d} x^{2}}+3 \frac{\mathrm{d} y}{\mathrm{d} x}+2 y=\cos x-3\sin x$.
For $y=\sin x$, $\frac{\mathrm{d}^{2} y}{\mathrm{d} x^{2}}+3 \frac{\mathrm{d} y}{\mathrm{d} x}+2 y=3\cos x+\sin x$.
$4 e^{3 x}+2 \sin x=\frac{2}{3} 6e^x-\frac35(\cos x-3\sin x)+\frac15(3\cos x+\sin x)$.
So $\frac23e^x-\frac35\cos x+\frac15\sin x$ is a solution. So general solution is $\frac23e^x-\frac35\cos x+\frac15\sin x+Ae^{-x}+Be^{-2x}$.
(b)For $y=x^2$, $\frac{\mathrm{d}^{2} y}{\mathrm{d} x^{2}}+2 \frac{\mathrm{d} y}{\mathrm{d} x}+3 y=3 x^2+4 x+2$.
For $y=x$, $\frac{\mathrm{d}^{2} y}{\mathrm{d} x^{2}}+2 \frac{\mathrm{d} y}{\mathrm{d} x}+3 y=3x+2$.
$x^2+2=\frac{1}{3} \left(3 x^2+4 x+2\right)-\frac{4}{9} (3 x+2)+\frac{20}9$.
So $\frac13x^2-\frac49x+\frac{20}{27}$ is a solution. So general solution is $\frac13x^2-\frac49x+\frac{20}{27}+e^{-x}(A\cos\sqrt2x+B\sin\sqrt2x)$.