Worked Exercises
Solve the given differential equation by separation of variables
2.2: 1. \(\,\displaystyle \frac{dy}{dx}=\sin 5 x\)
Solution
\[
\begin{aligned}
\frac{dy}{dx} &=\sin 5x\\
&\Downarrow \\
dy &= \sin 5x \,dx \\
&\Downarrow \\
y &=-\frac{1}{5} \cos 5x +c
\end{aligned}\]
2.2: 3. \(\,\displaystyle dx +e^{3x} dy = 0\)
Solution
\[
\begin{aligned}
dy &=-e^{-3x} \,dx\\
&\Downarrow \\
y &= \frac{1}{3}e^{-3x} +c
\end{aligned}\]
2.2: 21. \(\,\displaystyle \frac{dy}{dx} = x\sqrt{1 -y^2}\)
Solution
\[
\begin{aligned}
\frac{1}{\sqrt{1 -y^2}}dy &= x \,dx\\
&\Downarrow \\
\arcsin y &= \frac{1}{2}x^2 +c \\
&\Downarrow \\
y &= \sin \left(\frac{1}{2}x^2 +c \right)
\end{aligned}\]
2.2: 25. Find an implicit or an explicit solution of the given initial-value problem
\[ x^2 \frac{dy}{dx} = y -xy, \;\;y(-1)=-1\]
Solution
\[
\begin{aligned}
\frac{1}{y}dy &= \frac{1-x}{x^2} \,dx\\
&\Downarrow \\
\ln |y| &= -\left(\frac{1}{x} +\ln |x| \right) +c \\
&\Downarrow {\small y(-1)=-1 \; \Rightarrow \; c=-1}\\
\ln |y| &= -\left(1 +\frac{1}{x} \right) -\ln |x| \\
&\Downarrow \\
y &= \frac{1}{x} e^{-\left( 1 +\frac{1}{x}\right)}
\end{aligned}\]
2.7: 41. \(\,\) Evaporating Raindrop \(\,\) As a raindrop falls, it evaporates while retaining its spherical shape. If we make the further assumptions that the rate at which the raindrop evaporates is proportional to its surface area and that air resistance is negligible, then a model for the velocity \(v(t)\) of the raindrop is
\[
\frac{dv}{dt} + \frac{3(k/\rho)}{(k/\rho) t +r_0} v = g
\]
Here \(\rho\) is the density of water, \(r_0\) is the radius of the raindrop at \(t=0\), \(k < 0\) is the constant of proportionality \(\displaystyle \frac{dm}{dt}=4\pi r^2 k\), and the downward direction is taken to be the positive direction
(a)\(\,\) Solve for \(v(t)\) if the raindrop falls from the rest
(b)\(\,\) Show that the radius of the raindrop at time \(t\) is \(r(t)=(k/\rho)t +r_0\)
(c)\(\,\) If \(r_0=0.01\) ft and \(r =0.007\) ft at time \(t=10\) sec after the raindrop falls from a cloud, determine the time at which the raindrop has evaporated completely
Solution
(a)\(\,\)
\[
\begin{aligned}
\frac{dv}{dt} &+ \frac{3(k/\rho)}{(k/\rho) t +r_0} v = g \\
&\Downarrow {\small \text{ multiply by the integral factor }} \\
\frac{d}{dt} \left[ \left(\frac{k}{\rho}t +r_0 \right)^3 v \right] &= \left(\frac{k}{\rho}t +r_0 \right)^3 g\\
&\Downarrow \\
v(t)=\frac{g\rho}{4k} \left( \frac{k}{\rho} t +r_0 \right) &+c\left(\frac{k}{\rho}t +r_0 \right)^{-3} \\
&\Downarrow {\small \text{ } v(0)=0 \; \rightarrow \;c = -\frac{g\rho}{4k} r_0^4} \\
v(t) = \frac{g\rho}{4k} \left(\frac{k}{\rho}t +r_0 \right) & \left[ 1 - \left( \frac{r_0}{ \frac{k}{\rho}t +r_0 }
\right)^4 \right] \\
\end{aligned}\]
(b)\(\,\)
\[
\begin{aligned}
m &= \frac{4}{3}\pi r^3 \rho\\
&\Downarrow \\
\frac{dm}{dt} &= 4\pi r^2 \rho \frac{dr}{dt}\\
&\Downarrow \text{ } {\scriptstyle \frac{dm}{dt}=4\pi r^2 k}\\
\frac{dr}{dt} &= \frac{k}{\rho} \\
&\Downarrow \text{ } {\scriptstyle r=r_0 \text{ at } t=0} \\
r(t) &= \frac{k}{\rho} t +r_0
\end{aligned}\]
(c)\(\,\)
\[
\begin{aligned}
r(10) &= \frac{k}{\rho} \times 10 +0.01 =0.007 \; \Rightarrow \; \frac{k}{\rho} = -0.0003\\
&\Downarrow \\
r(t) &= -0.0003 t + 0.01 = 0 \; \Rightarrow \; t =\frac{0.01}{0.0003} \approx 33.3 \;\text{sec}
\end{aligned}\]
\(~\)
1. \(~\)Find an explicit solution of the given initial value problem
\[\sqrt{1-y^2} \,dx -\sqrt{1-x^2}\,dy=0, \;y(0)=\sqrt{3}/2\]
Solution
Step 1: \(~\)Rearrange the Equation
We write the equation in differential form:
\[\sqrt{1 - y^2} \, dx = \sqrt{1 - x^2} \, dy\]
Separate variables:
\[\frac{dx}{\sqrt{1 - x^2}} = \frac{dy}{\sqrt{1 - y^2}}\]
Step 2: \(~\)Integrate Both Sides
\[\int \frac{dx}{\sqrt{1 - x^2}} = \int \frac{dy}{\sqrt{1 - y^2}}\]
These are standard integrals:
So:
\[\arcsin x = \arcsin y + C\]
Step 3: \(~\)Solve for the Constant Using the Initial Condition
We’re given \(y(0) = \frac{\sqrt{3}}{2}\), so plug in \(x = 0\), \(y = \frac{\sqrt{3}}{2}\):
\[\arcsin(0) = \arcsin\left(\frac{\sqrt{3}}{2}\right) + C\]
\[0 = \frac{\pi}{3} + C \Rightarrow C = -\frac{\pi}{3}\]
Step 4: \(~\)Write the Explicit Solution
From earlier:
\[\arcsin x = \arcsin y - \frac{\pi}{3}\]
Solve for \(y\):
\[\arcsin y = \arcsin x + \frac{\pi}{3}\]
Now apply \(\sin\) to both sides:
\[y = \sin\left(\arcsin x + \frac{\pi}{3}\right)\]
\(~\)
2. \(~\)Find an explicit solution of the given initial value problem
\[\frac{dy}{dx} =-y\ln y, \;y(0)=e\]
Solution
Step 1: \(~\)Separate Variables
We want to isolate \(y\) and \(x\):
\[\frac{dy}{dx} = -y \ln y
\quad \Rightarrow \quad
\frac{1}{y \ln y} \, dy = -dx\]
Step 2: \(~\)Integrate Both Sides
Let’s handle the left-hand side:
Let \(u = \ln y\), then:
\[\frac{du}{dy} = \frac{1}{y} \Rightarrow du = \frac{1}{y} \, dy\]
So:
\[\frac{1}{y \ln y} \, dy = \frac{1}{u} \cdot du = \frac{du}{u}\]
Thus, we have:
\[\int \frac{dy}{y \ln y} = \int \frac{du}{u} = \ln |\ln y|\]
So now integrate both sides:
\[\int \frac{dy}{y \ln y} = \int -dx \quad \Rightarrow \quad \ln|\ln y| = -x + C\]
Step 3: \(~\)Solve for \(y(x)\)
Start with:
\[\ln|\ln y| = -x + C\]
Exponentiate both sides:
\[|\ln y| = e^{-x + C} = A e^{-x}, \quad A > 0\]
So:
\[\ln y = \pm A e^{-x}\]
We drop the \(\pm\) by using a general constant \(B = \pm A\), so:
\[\ln y = B e^{-x} \Rightarrow y = e^{B e^{-x}}\]
Step 4: \(~\)Apply Initial Condition \(y(0) = e\)
Plug in:
\[y(0) = e^{B e^0} = e^{B} = e
\Rightarrow B = 1\]
Final Answer:
\[y(x) = e^{e^{-x}}\]
This is the explicit solution satisfying the differential equation and the initial condition \(y(0) = e\)
\(~\)
3. \(~\)Solve the given initial-value problem
\[\frac{dy}{dx} = \frac{3x+2y}{3x+2y+2}, \;y(-1)=-1\]
Solution
Step 1: \(~\)Make a Substitution
Let us simplify the expression by setting:
\[u = 3x + 2y\]
Differentiate both sides with respect to x:
\[\frac{du}{dx} = 3 + 2\frac{dy}{dx}\]
Now solve for from this:
\[\frac{dy}{dx} = \frac{1}{2} \left( \frac{du}{dx} - 3 \right)\]
But also, from the original equation:
\[\frac{dy}{dx} = \frac{u}{u + 2}\]
So equating both expressions:
\[\frac{1}{2} \left( \frac{du}{dx} - 3 \right) = \frac{u}{u + 2}\]
So:
\[\frac{du}{dx} = 3 + \frac{2u}{u + 2}\]
Step 2: \(~\)Simplify the Right-Hand Side
We simplify and so:
\[\frac{du}{dx} = \frac{5u + 6}{u + 2}\]
Step 3: \(~\)Separate Variables and Integrate
We separate:
\[\frac{u + 2}{5u + 6} \, du = dx\]
Let’s integrate the left-hand side. Let’s simplify:
\[\int \frac{u + 2}{5u + 6} \, du = \int \left[ \frac{1}{5} + \frac{4}{5(5u + 6)} \right] du
= \frac{1}{5} u + \frac{4}{25} \ln |5u + 6| + C\]
So:
\[x = \frac{1}{5} u + \frac{4}{25} \ln |5u + 6| + C\]
Step 4: \(~\)Substitute Back \(u = 3x + 2y\)
Recall \(u = 3x + 2y\). So we substitute:
\[x = \frac{1}{5}(3x + 2y) + \frac{4}{25} \ln |5(3x + 2y) + 6| + C\]
This is an implicit solution
Step 5: \(~\)Apply the Initial Condition \(y(-1) = -1\)
Recall \(u = 3x + 2y\), so at \(x = -1\), \(y = -1\):
\[u = 3(-1) + 2(-1) = -5
\Rightarrow 5u + 6 = -25 + 6 = -19\]
Then:
\[-1 = \frac{1}{5}(-5) + \frac{4}{25} \ln(19) + C
\Rightarrow C = - \frac{4}{25} \ln 19\]
Final Answer:
\[
x = \frac{1}{5}(3x + 2y) + \frac{4}{25} \ln |5(3x + 2y) + 6| - \frac{4}{25} \ln 19
\]
\(~\)
4. \(~\)Solve the given differential equation
\[\frac{dy}{dx} = \tan^2(x+y)\]
Solution
Step 1: \(~\)Make a Substitution
Let’s simplify the expression using substitution.
Let:
\[u = x + y \quad \Rightarrow \quad \frac{du}{dx} = 1 + \frac{dy}{dx}\]
From the original equation:
\[\frac{dy}{dx} = \tan^2(x + y) = \tan^2 u\]
So:
\[\frac{du}{dx} = 1 + \tan^2 u = \sec^2 u\]
Step 2: \(~\)Separate Variables and Integrate
\[\frac{du}{\sec^2 u} = dx \quad \Rightarrow \quad \cos^2 u \, du = dx\]
So integrate both sides:
\[\int \cos^2 u \, du = \int \frac{1 + \cos(2u)}{2} \, du = \frac{1}{2} \left[ u + \frac{1}{2} \sin(2u) \right]\]
So:
\[\frac{1}{2} u + \frac{1}{4} \sin(2u) = x + C\]
Step 3: \(~\)Substitute Back \(u = x + y\)
\[\frac{1}{2}(x + y) + \frac{1}{4} \sin(2(x + y)) = x + C\]
where \(C\) is a constant of integration. This is an implicit solution to the original differential equation
\(~\)
5. \(~\) Find the solution of period \(2\pi\) of the equation
\[ y' +(\cos x) y = \sin 2x\]
Solution
Step 1: \(~\)Solve Using the Integrating Factor Method
Integrating Factor
\[\mu(x) = e^{\int \cos x \, dx} = e^{\sin x}\]
Multiply both sides of the ODE by \(\mu(x) = e^{\sin x}\):
\[e^{\sin x} y’ + e^{\sin x} \cos x \, y = e^{\sin x} \sin 2x\]
Left-hand side becomes:
\[\frac{d}{dx}\left( e^{\sin x} y \right) = e^{\sin x} \sin 2x\]
Step 2: \(~\)Integrate Both Sides
\[\int \frac{d}{dx}(e^{\sin x} y) \, dx = \int e^{\sin x} \sin 2x \, dx\]
So:
\[y(x) = e^{-\sin x} \left( \int e^{\sin x} \sin 2x \, dx + C \right)\]
Step 3: \(~\)Impose Periodicity
Let’s denote:
\[I(x) := \int e^{\sin x} \sin 2x \, dx
\Rightarrow y(x) = e^{-\sin x} (I(x) + C)\]
Let’s write the condition:
\[
\begin{aligned}
y(x + 2\pi) = y(x) \; &\Rightarrow \; e^{-\sin x} (I(x + 2\pi) + C) = e^{-\sin x} (I(x) + C)\\
&\Rightarrow I(x + 2\pi) = I(x)
\end{aligned}\]
But:
\[
I(x + 2\pi) = \int_{0}^{x + 2\pi} e^{\sin t} \sin 2t \, dt = \int_{0}^{x} e^{\sin t} \sin 2t \, dt + \int_{x}^{x+2\pi} e^{\sin t} \sin 2t \, dt\]
Therefore, periodicity condition is:
\[I(x + 2\pi) - I(x) = \int_{x}^{x + 2\pi} e^{\sin t} \sin 2t \, dt = 0\]
So the \(2\pi\)-periodic solution is:
\[y(x) = e^{-\sin x} \int_0^x e^{\sin t} \sin 2t \, dt\]
\(~\)
6. \(~\) Find the solution of period \(2\pi\) of the equation
\[ y' +3 y = \cos x\]
Solution
Step 1: \(~\)General Solution via Integrating Factor
This is a first-order linear ODE. Let’s solve it using the integrating factor method.
Let:
\(\mu(x) = e^{\int 3 \, dx} = e^{3x}\)
Multiply both sides of the equation by \(e^{3x}\):
\[e^{3x} y’ + 3 e^{3x} y = e^{3x} \cos x
\Rightarrow \frac{d}{dx}(e^{3x} y) = e^{3x} \cos x\]
Now integrate both sides:
\[e^{3x} y = \int e^{3x} \cos x \, dx\]
Step 2: \(~\)Compute the Integral
\[\int e^{3x} \cos x \, dx = \frac{e^{3x}}{10}(3 \cos x + \sin x) + C\]
Thus:
\[e^{3x} y = \frac{e^{3x}}{10}(3 \cos x + \sin x) + C
\Rightarrow y(x) = \frac{1}{10}(3 \cos x + \sin x) + C e^{-3x}\]
Step 3: \(~\)Impose Periodicity
We are asked to find a solution with period \(2\pi\). Let’s analyze:
- The term \(\frac{1}{10}(3 \cos x + \sin x)\) is clearly \(2\pi\)-periodic
- But the term \(C e^{-3x}\) is not periodic unless \(C = 0\)
So to obtain a periodic solution, we must take: \(C = 0\)
Final Answer:
\[y(x) = \frac{1}{10}(3 \cos x + \sin x)\]
\(~\)
7. \(~\) Solve the given differential equation by using an appropriate substitution
\[ \frac{dy}{dx} = \sin(x+y)\]
Solution
Step 1: \(~\)Use Substitution
Let:
\[u = x + y \quad \Rightarrow \quad \frac{du}{dx} = 1 + \frac{dy}{dx}\]
Substitute into the derivative of \(u\): \[\frac{du}{dx} = 1 + \sin u\]
Step 2: \(~\)Separate Variables
We now have the separable equation:
\[\frac{du}{1 + \sin u} = dx\]
We simplify the left-hand side:
\[\frac{1}{1 + \sin u} = \frac{1 - \sin u}{(1 + \sin u)(1 - \sin u)}
= \frac{1 - \sin u}{1 - \sin^2 u} = \frac{1 - \sin u}{\cos^2 u}\]
Now integrate:
\[\int \sec^2 u \, du = \tan u, \quad
\int \sec u \tan u \, du = \sec u\]
So:
\[\int \frac{du}{1 + \sin u} = \tan u - \sec u + C = x + C\]
Step 3: \(~\)Substitute Back \(u = x + y\)
\[\tan(x + y) - \sec(x + y) = x + C\]
This is the implicit general solution to the differential equation
\(~\)
8. \(~\) Find a general solution of the equation
\[ydx+(2x+xy-3)dy=0\]
Solution
\[\begin{aligned}
ydx +(2x+xy-3)&dy =0 \\
&\Downarrow \\
\frac{dx}{dy} + \left(1 + \frac{2}{y} \right)x &= \frac{3}{y} \\
&\Downarrow \\
\frac{d}{dy} \left[ x \,y^2 e^y \right ] &= 3y e^y \\
&\Downarrow \\
\color{red}{x = \frac{3}{y}\left(1-\frac{1}{y} \right)}\, & \color{red}{\, + \,Cy^{-2} e^{-y}}
\end{aligned}\]
\[~\text{or}~\]
\[\begin{aligned}
ydx \;+\;&(2x+xy-3)dy =0 \\
&\Downarrow \;\; \times \, y e^y\\
y^2 e^y dx \;+\;&y e^y (2x+xy-3)dy =0 \\
&\Downarrow \\
\frac{\partial f}{\partial x} = y^2 e^y \;\;&\rightarrow \;\; f(x,y) =y^2 e^y x + h(y)\\
&\Downarrow \\
\frac{\partial f}{\partial y} = ye^y(2x +xy) +\frac{dh}{dy} \;\;&\rightarrow \;\; \frac{dh}{dy} = -3y e^y\\
&\Downarrow \\
h(y) =-3e^y (y-1) - C \;\;&\rightarrow \;\; f(x,y) =y^2 e^y x -3e^y (y-1) = C \\
&\Downarrow \\
\color{red}{x = \frac{3}{y}\left(1-\frac{1}{y} \right)}\, & \color{red}{\, + \,Cy^{-2} e^{-y}}
\end{aligned}\]
\(~\)
9. \(~\) Solve the differential equation
\[ xv\frac{dv}{dx} +v^2=32x \]
Solution \[
\begin{aligned}
xv\frac{dv}{dx} +v^2 &=32x \\
&\Downarrow \\
\frac{dv}{dx} +\frac{1}{x} v &= \frac{32}{v}\\
&\Downarrow \;\; u = v^2, \; \frac{du}{dx} = 2v \frac{dv}{dx}\\
\frac{du}{dx} +\frac{2}{x}u &= 64\\
&\Downarrow \\
\frac{d}{dx} \left( u x^2 \right ) &= 64x^2 \\
&\Downarrow \\
u = \frac{64}{3} x + \frac{C}{x^2} \;\;&\rightarrow \;\; \color{red}{v = \pm\sqrt{\frac{64}{3} x + \frac{C}{x^2}}}
\end{aligned}
\]
\(~\)
10. \(~\) Solve the initial-value problem
\[\frac{dy}{dt} + 2(t+1) y^2=0, \;\;y(0)=-\frac{1}{8}\]
and give the largest interval \(I\) on which the solution is defined:
Solution
\[\begin{aligned}
\frac{dy}{dt} &+2(t+1)y^2 = 0 \\
&\Downarrow \\
\frac{dy}{y^2} &= -2(t+1) \, dt \\
&\Downarrow \\
y &= \frac{1}{t^2 + 2t + c}, \;\; y(0)=-\frac{1}{8} \\
&\Downarrow \\
\color{red}{y} &\color{red}{= \frac{1}{(t-2)(t+4)}, \;\;-4<t<2}
\end{aligned}
\]
\(~\)