Differential Equations — Diagnostic Tests
Unit Tests
UT-1: First Order Separable Equations
Question: Solve d y d x = x y \frac{dy}{dx} = \frac{x}{y} d x d y = y x given that y = 2 y = 2 y = 2 when x = 1 x = 1 x = 1 . (b) Solve
d y d x = x y \frac{dy}{dx} = xy d x d y = x y given that y = 1 y = 1 y = 1 when x = 0 x = 0 x = 0 . (c) Solve d y d x = y 2 + 1 y \frac{dy}{dx} = \frac{y^2 + 1}{y} d x d y = y y 2 + 1
given that y = 0 y = 0 y = 0 when x = 0 x = 0 x = 0 . (d) Explain what is meant by a “particular solution” versus a
“general solution”.
Solution:
(a) y d y = x d x y\,dy = x\,dx y d y = x d x . y 2 2 = x 2 2 + C \frac{y^2}{2} = \frac{x^2}{2} + C 2 y 2 = 2 x 2 + C . y 2 = x 2 + C y^2 = x^2 + C y 2 = x 2 + C . At ( 1 , 2 ) (1,2) ( 1 , 2 ) :
4 = 1 + C$$C = 3 . y^2 = x^2 + 3$$y = \sqrt{x^2 + 3} (taking positive root).
(b) d y y = x d x \frac{dy}{y} = x\,dx y d y = x d x . ln ∣ y ∣ = x 2 2 + C \ln|y| = \frac{x^2}{2} + C ln ∣ y ∣ = 2 x 2 + C . y = A e x 2 / 2 y = Ae^{x^2/2} y = A e x 2 /2 . At ( 0 , 1 ) (0,1) ( 0 , 1 ) : 1 = A 1 = A 1 = A So
y = e x 2 / 2 y = e^{x^2/2} y = e x 2 /2 .
(c) y y 2 + 1 d y = d x \frac{y}{y^2 + 1}\,dy = dx y 2 + 1 y d y = d x . Integrating: 1 2 ln ( y 2 + 1 ) = x + C \frac{1}{2}\ln(y^2 + 1) = x + C 2 1 ln ( y 2 + 1 ) = x + C .
ln ( y 2 + 1 ) = 2 x + C \ln(y^2 + 1) = 2x + C ln ( y 2 + 1 ) = 2 x + C . At ( 0 , 0 ) (0,0) ( 0 , 0 ) : ln 1 = C = 0 \ln 1 = C = 0 ln 1 = C = 0 . y^2 + 1 = e^{2x}$$y = \sqrt{e^{2x} - 1} .
(d) The general solution contains an arbitrary constant C C C and represents the family of all
possible solutions. The particular solution is obtained by using an initial/boundary condition
to find the value of C C C Giving a single specific solution.
UT-2: Second Order Linear DEs
Question: (a) Solve d 2 y d x 2 − 5 d y d x + 6 y = 0 \frac{d^2y}{dx^2} - 5\frac{dy}{dx} + 6y = 0 d x 2 d 2 y − 5 d x d y + 6 y = 0 . (b) Solve
d 2 y d x 2 + 4 y = 0 \frac{d^2y}{dx^2} + 4y = 0 d x 2 d 2 y + 4 y = 0 given that y = 1 y = 1 y = 1 and d y d x = 0 \frac{dy}{dx} = 0 d x d y = 0 when x = 0 x = 0 x = 0 . (c) Solve
d 2 y d x 2 + 6 d y d x + 9 y = 0 \frac{d^2y}{dx^2} + 6\frac{dy}{dx} + 9y = 0 d x 2 d 2 y + 6 d x d y + 9 y = 0 . (d) Explain the significance of the discriminant of
the auxiliary equation.
Solution:
(a) Auxiliary equation: m 2 − 5 m + 6 = 0 m^2 - 5m + 6 = 0 m 2 − 5 m + 6 = 0 . ( m − 2 ) ( m − 3 ) = 0 (m-2)(m-3) = 0 ( m − 2 ) ( m − 3 ) = 0 . m = 2 , 3 m = 2, 3 m = 2 , 3 . General solution:
y = A e 2 x + B e 3 x y = Ae^{2x} + Be^{3x} y = A e 2 x + B e 3 x .
(b) m 2 + 4 = 0 m^2 + 4 = 0 m 2 + 4 = 0 . m = ± 2 i m = \pm 2i m = ± 2 i . General solution: y = A cos 2 x + B sin 2 x y = A\cos 2x + B\sin 2x y = A cos 2 x + B sin 2 x . y ( 0 ) = 1 y(0) = 1 y ( 0 ) = 1 : A = 1 A = 1 A = 1 .
y ′ ( 0 ) = 0 y'(0) = 0 y ′ ( 0 ) = 0 : 2B = 0$$B = 0 . Particular solution: y = cos 2 x y = \cos 2x y = cos 2 x .
(c) m 2 + 6 m + 9 = 0 m^2 + 6m + 9 = 0 m 2 + 6 m + 9 = 0 . ( m + 3 ) 2 = 0 (m+3)^2 = 0 ( m + 3 ) 2 = 0 . m = − 3 m = -3 m = − 3 (repeated root). General solution:
y = ( A + B x ) e − 3 x y = (A + Bx)e^{-3x} y = ( A + B x ) e − 3 x .
(d) The discriminant Δ = b 2 − 4 a c \Delta = b^2 - 4ac Δ = b 2 − 4 a c of the auxiliary equation a m 2 + b m + c = 0 am^2 + bm + c = 0 a m 2 + bm + c = 0 determines
the nature of solutions:
Δ > 0 \Delta \gt 0 Δ > 0 : Two distinct real roots, general solution y = A e m 1 x + B e m 2 x y = Ae^{m_1x} + Be^{m_2x} y = A e m 1 x + B e m 2 x .
Δ = 0 \Delta = 0 Δ = 0 : One repeated real root, general solution y = ( A + B x ) e m x y = (A + Bx)e^{mx} y = ( A + B x ) e m x .
Δ < 0 \Delta \lt 0 Δ < 0 : Complex conjugate roots m = α ± β i m = \alpha \pm \beta i m = α ± β i General solution
y = e α x ( A cos β x + B sin β x ) y = e^{\alpha x}(A\cos\beta x + B\sin\beta x) y = e α x ( A cos β x + B sin β x ) .
UT-3: Second Order DEs with RHS
Question: (a) Find the particular integral and general solution of
d 2 y d x 2 − 3 d y d x + 2 y = 4 \frac{d^2y}{dx^2} - 3\frac{dy}{dx} + 2y = 4 d x 2 d 2 y − 3 d x d y + 2 y = 4 . (b) Solve d 2 y d x 2 + y = 10 cos x \frac{d^2y}{dx^2} + y = 10\cos x d x 2 d 2 y + y = 10 cos x . (c)
Solve d 2 y d x 2 − 4 y = 2 e 3 x \frac{d^2y}{dx^2} - 4y = 2e^{3x} d x 2 d 2 y − 4 y = 2 e 3 x .
Solution:
(a) CFE: m^2 - 3m + 2 = 0$$m = 1, 2 . CF: y c = A e x + B e 2 x y_c = Ae^x + Be^{2x} y c = A e x + B e 2 x . PI: try y p = k y_p = k y p = k .
0 - 0 + 2k = 4$$k = 2 . GS: y = A e x + B e 2 x + 2 y = Ae^x + Be^{2x} + 2 y = A e x + B e 2 x + 2 .
(b) CFE: m^2 + 1 = 0$$m = \pm i . CF: y c = A cos x + B sin x y_c = A\cos x + B\sin x y c = A cos x + B sin x . PI: since cos x \cos x cos x is in the CF,
try y p = x ( C cos x + D sin x ) y_p = x(C\cos x + D\sin x) y p = x ( C cos x + D sin x ) . y p ′ = C cos x + D sin x + x ( − C sin x + D cos x ) y_p' = C\cos x + D\sin x + x(-C\sin x + D\cos x) y p ′ = C cos x + D sin x + x ( − C sin x + D cos x ) .
y p ′ ′ = − C sin x + D cos x − C sin x + D cos x + x ( − C cos x − D sin x ) = − 2 C sin x + 2 D cos x − x ( C cos x + D sin x ) y_p'' = -C\sin x + D\cos x - C\sin x + D\cos x + x(-C\cos x - D\sin x) = -2C\sin x + 2D\cos x - x(C\cos x + D\sin x) y p ′′ = − C sin x + D cos x − C sin x + D cos x + x ( − C cos x − D sin x ) = − 2 C sin x + 2 D cos x − x ( C cos x + D sin x ) .
y p ′ ′ + y p = − 2 C sin x + 2 D cos x = 10 cos x y_p'' + y_p = -2C\sin x + 2D\cos x = 10\cos x y p ′′ + y p = − 2 C sin x + 2 D cos x = 10 cos x .
2D = 10 \Rightarrow D = 5$$-2C = 0 \Rightarrow C = 0 . PI: y p = 5 x sin x y_p = 5x\sin x y p = 5 x sin x . GS:
y = A cos x + B sin x + 5 x sin x y = A\cos x + B\sin x + 5x\sin x y = A cos x + B sin x + 5 x sin x .
(c) CFE: m^2 - 4 = 0$$m = \pm 2 . CF: y c = A e 2 x + B e − 2 x y_c = Ae^{2x} + Be^{-2x} y c = A e 2 x + B e − 2 x . PI: try y p = c e 3 x y_p = ce^{3x} y p = c e 3 x .
9 c e 3 x − 4 c e 3 x = 2 e 3 x 9ce^{3x} - 4ce^{3x} = 2e^{3x} 9 c e 3 x − 4 c e 3 x = 2 e 3 x . 5c = 2$$c = 2/5 . GS:
y = A e 2 x + B e − 2 x + 2 5 e 3 x y = Ae^{2x} + Be^{-2x} + \frac{2}{5}e^{3x} y = A e 2 x + B e − 2 x + 5 2 e 3 x .
Integration Tests
IT-1: Modelling with DEs (with Mechanics)
Question: A particle of mass m m m falls under gravity with air resistance proportional to
velocity: m d v d t = m g − k v m\frac{dv}{dt} = mg - kv m d t d v = m g − k v . (a) Solve the DE given v = 0 v = 0 v = 0 when t = 0 t = 0 t = 0 . (b) Find the
terminal velocity. (c) Calculate v v v when t = m / k t = m/k t = m / k as a fraction of terminal velocity. (d) Sketch
the velocity-time graph.
Solution:
(a) d v d t = g − k m v \frac{dv}{dt} = g - \frac{k}{m}v d t d v = g − m k v . Let α = k / m \alpha = k/m α = k / m : d v d t + α v = g \frac{dv}{dt} + \alpha v = g d t d v + α v = g .
Integrating factor: e α t e^{\alpha t} e α t . d d t ( v e α t ) = g e α t \frac{d}{dt}(ve^{\alpha t}) = ge^{\alpha t} d t d ( v e α t ) = g e α t .
v e α t = ◆ L B ◆ g ◆ R B ◆◆ L B ◆ α ◆ R B ◆ e α t + C ve^{\alpha t} = \frac◆LB◆g◆RB◆◆LB◆\alpha◆RB◆e^{\alpha t} + C v e α t = L ◆ B ◆ g ◆ R B ◆◆ L B ◆ α ◆ R B ◆ e α t + C .
v = ◆ L B ◆ g ◆ R B ◆◆ L B ◆ α ◆ R B ◆ + C e − α t = m g k + C e − k t / m v = \frac◆LB◆g◆RB◆◆LB◆\alpha◆RB◆ + Ce^{-\alpha t} = \frac{mg}{k} + Ce^{-kt/m} v = L ◆ B ◆ g ◆ R B ◆◆ L B ◆ α ◆ R B ◆ + C e − α t = k m g + C e − k t / m . At t = 0 t = 0 t = 0 :
0 = mg/k + C$$C = -mg/k . v = m g k ( 1 − e − k t / m ) v = \frac{mg}{k}(1 - e^{-kt/m}) v = k m g ( 1 − e − k t / m ) .
(b) Terminal velocity: as t \to \infty$$e^{-kt/m} \to 0 So v term = m g k v_{\text{term}} = \frac{mg}{k} v term = k m g .
(c) At t = m / k t = m/k t = m / k : v = m g k ( 1 − e − 1 ) = m g k ( 1 − 0.368 ) = 0.632 v term v = \frac{mg}{k}(1 - e^{-1}) = \frac{mg}{k}(1 - 0.368) = 0.632 v_{\text{term}} v = k m g ( 1 − e − 1 ) = k m g ( 1 − 0.368 ) = 0.632 v term .
The particle reaches approximately 63.2% of terminal velocity.
(d) The graph starts at v = 0 v = 0 v = 0 with steep gradient g g g Curves concavely, and asymptotically
approaches v = m g / k v = mg/k v = m g / k . It is a typical exponential approach curve.
IT-2: Coupled DEs (with Matrices)
Question: Solve the system: \frac{dx}{dt} = 2x + y$$\frac{dy}{dt} = x + 2y With
x(0) = 1$$y(0) = 0 . (a) Write in matrix form. (b) Find eigenvalues and eigenvectors of the
coefficient matrix. (c) Solve the system. (d) Calculate x ( 1 ) x(1) x ( 1 ) and y ( 1 ) y(1) y ( 1 ) .
Solution:
(a)
d d t ( x y ) = ( 2 1 1 2 ) ( x y ) \frac{d}{dt}\begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} d t d ( x y ) = ( 2 1 1 2 ) ( x y ) .
(b) From the matrix diagnostics: eigenvalues λ 1 = 3 \lambda_1 = 3 λ 1 = 3 (eigenvector
( 1 1 ) \begin{pmatrix}1\\1\end{pmatrix} ( 1 1 ) ) and λ 2 = 1 \lambda_2 = 1 λ 2 = 1 (eigenvector
( 1 − 1 ) \begin{pmatrix}1\\-1\end{pmatrix} ( 1 − 1 ) ).
(c)
( x y ) = c 1 e 3 t ( 1 1 ) + c 2 e t ( 1 − 1 ) \begin{pmatrix}x\\y\end{pmatrix} = c_1 e^{3t}\begin{pmatrix}1\\1\end{pmatrix} + c_2 e^{t}\begin{pmatrix}1\\-1\end{pmatrix} ( x y ) = c 1 e 3 t ( 1 1 ) + c 2 e t ( 1 − 1 ) .
( 1 0 ) = c 1 ( 1 1 ) + c 2 ( 1 − 1 ) \begin{pmatrix}1\\0\end{pmatrix} = c_1\begin{pmatrix}1\\1\end{pmatrix} + c_2\begin{pmatrix}1\\-1\end{pmatrix} ( 1 0 ) = c 1 ( 1 1 ) + c 2 ( 1 − 1 ) .
c 1 + c 2 = 1 c_1 + c_2 = 1 c 1 + c 2 = 1 and c 1 − c 2 = 0 c_1 - c_2 = 0 c 1 − c 2 = 0 So c 1 = c 2 = 1 / 2 c_1 = c_2 = 1/2 c 1 = c 2 = 1/2 .
x = \frac{e^{3t} + e^t}{2}$$y = \frac{e^{3t} - e^t}{2} .
(d) x ( 1 ) = e 3 + e 2 = 20.086 + 2.718 2 = 11.40 x(1) = \frac{e^3 + e}{2} = \frac{20.086 + 2.718}{2} = 11.40 x ( 1 ) = 2 e 3 + e = 2 20.086 + 2.718 = 11.40 .
y ( 1 ) = e 3 − e 2 = 20.086 − 2.718 2 = 8.68 y(1) = \frac{e^3 - e}{2} = \frac{20.086 - 2.718}{2} = 8.68 y ( 1 ) = 2 e 3 − e = 2 20.086 − 2.718 = 8.68 .
IT-3: Forming DEs from Context (with Complex Numbers)
Question: The current I ( t ) I(t) I ( t ) in an RL circuit with inductance L L L and resistance R R R satisfies
L d I d t + R I = V 0 cos ( ω t ) L\frac{dI}{dt} + RI = V_0\cos(\omega t) L d t d I + R I = V 0 cos ( ω t ) . (a) Solve this DE given I ( 0 ) = 0 I(0) = 0 I ( 0 ) = 0 . (b) Identify the
transient and steady-state components. (c) Find the amplitude of the steady-state current. (d)
Explain what happens when ω → 0 \omega \to 0 ω → 0 .
Solution:
(a) d I d t + R L I = V 0 L cos ( ω t ) \frac{dI}{dt} + \frac{R}{L}I = \frac{V_0}{L}\cos(\omega t) d t d I + L R I = L V 0 cos ( ω t ) . Let α = R / L \alpha = R/L α = R / L .
IF: e α t e^{\alpha t} e α t . d d t ( I e α t ) = V 0 L e α t cos ( ω t ) \frac{d}{dt}(Ie^{\alpha t}) = \frac{V_0}{L}e^{\alpha t}\cos(\omega t) d t d ( I e α t ) = L V 0 e α t cos ( ω t ) .
The PI requires I p = A cos ( ω t ) + B sin ( ω t ) I_p = A\cos(\omega t) + B\sin(\omega t) I p = A cos ( ω t ) + B sin ( ω t ) .
I p ′ = − A ω sin ( ω t ) + B ω cos ( ω t ) I_p' = -A\omega\sin(\omega t) + B\omega\cos(\omega t) I p ′ = − A ω sin ( ω t ) + B ω cos ( ω t ) .
α I p + I p ′ = α A cos + α B sin − A ω sin + B ω cos = V 0 L cos ( ω t ) \alpha I_p + I_p' = \alpha A\cos + \alpha B\sin - A\omega\sin + B\omega\cos = \frac{V_0}{L}\cos(\omega t) α I p + I p ′ = α A cos + α B sin − A ω sin + B ω cos = L V 0 cos ( ω t ) .
α A + B ω = V 0 / L \alpha A + B\omega = V_0/L α A + B ω = V 0 / L and α B − A ω = 0 \alpha B - A\omega = 0 α B − A ω = 0 So B = A ω / α B = A\omega/\alpha B = A ω / α .
A α + A ω 2 / α = V 0 / L A\alpha + A\omega^2/\alpha = V_0/L A α + A ω 2 / α = V 0 / L .
A = ◆ L B ◆ V 0 α ◆ R B ◆◆ L B ◆ L ( α 2 + ω 2 ) ◆ R B ◆ = ◆ L B ◆ V 0 R ◆ R B ◆◆ L B ◆ L 2 ( ω 2 + R 2 / L 2 ) ◆ R B ◆ = ◆ L B ◆ V 0 R ◆ R B ◆◆ L B ◆ R 2 + ω 2 L 2 ◆ R B ◆ A = \frac◆LB◆V_0\alpha◆RB◆◆LB◆L(\alpha^2 + \omega^2)◆RB◆ = \frac◆LB◆V_0 R◆RB◆◆LB◆L^2(\omega^2 + R^2/L^2)◆RB◆ = \frac◆LB◆V_0 R◆RB◆◆LB◆R^2 + \omega^2 L^2◆RB◆ A = L ◆ B ◆ V 0 α ◆ R B ◆◆ L B ◆ L ( α 2 + ω 2 ) ◆ R B ◆ = L ◆ B ◆ V 0 R ◆ R B ◆◆ L B ◆ L 2 ( ω 2 + R 2 / L 2 ) ◆ R B ◆ = L ◆ B ◆ V 0 R ◆ R B ◆◆ L B ◆ R 2 + ω 2 L 2 ◆ R B ◆ .
I = C e − R t / L + ◆ L B ◆ V 0 ◆ R B ◆◆ L B ◆ R 2 + ω 2 L 2 ◆ R B ◆ [ R cos ( ω t ) + ω L sin ( ω t ) ] I = Ce^{-Rt/L} + \frac◆LB◆V_0◆RB◆◆LB◆R^2 + \omega^2 L^2◆RB◆[R\cos(\omega t) + \omega L\sin(\omega t)] I = C e − R t / L + L ◆ B ◆ V 0 ◆ R B ◆◆ L B ◆ R 2 + ω 2 L 2 ◆ R B ◆ [ R cos ( ω t ) + ω L sin ( ω t )] .
At t = 0 t = 0 t = 0 : 0 = C + ◆ L B ◆ V 0 R ◆ R B ◆◆ L B ◆ R 2 + ω 2 L 2 ◆ R B ◆ 0 = C + \frac◆LB◆V_0 R◆RB◆◆LB◆R^2 + \omega^2 L^2◆RB◆ 0 = C + L ◆ B ◆ V 0 R ◆ R B ◆◆ L B ◆ R 2 + ω 2 L 2 ◆ R B ◆ So
C = − ◆ L B ◆ V 0 R ◆ R B ◆◆ L B ◆ R 2 + ω 2 L 2 ◆ R B ◆ C = -\frac◆LB◆V_0 R◆RB◆◆LB◆R^2 + \omega^2 L^2◆RB◆ C = − L ◆ B ◆ V 0 R ◆ R B ◆◆ L B ◆ R 2 + ω 2 L 2 ◆ R B ◆ .
(b) Transient: C e − R t / L Ce^{-Rt/L} C e − R t / L (decays to zero as t → ∞ t \to \infty t → ∞ ). Steady-state:
◆ L B ◆ V 0 ◆ R B ◆◆ L B ◆ R 2 + ω 2 L 2 ◆ R B ◆ [ R cos ( ω t ) + ω L sin ( ω t ) ] \frac◆LB◆V_0◆RB◆◆LB◆R^2 + \omega^2 L^2◆RB◆[R\cos(\omega t) + \omega L\sin(\omega t)] L ◆ B ◆ V 0 ◆ R B ◆◆ L B ◆ R 2 + ω 2 L 2 ◆ R B ◆ [ R cos ( ω t ) + ω L sin ( ω t )] .
(c) Amplitude
= ◆ L B ◆ V 0 ◆ R B ◆◆ L B ◆ R 2 + ω 2 L 2 ◆ R B ◆ ◆ L B ◆ R 2 + ω 2 L 2 ◆ R B ◆ = ◆ L B ◆ V 0 ◆ R B ◆◆ L B ◆ R 2 + ω 2 L 2 ◆ R B ◆ = \frac◆LB◆V_0◆RB◆◆LB◆R^2 + \omega^2 L^2◆RB◆\sqrt◆LB◆R^2 + \omega^2 L^2◆RB◆ = \frac◆LB◆V_0◆RB◆◆LB◆\sqrt{R^2 + \omega^2 L^2}◆RB◆ = L ◆ B ◆ V 0 ◆ R B ◆◆ L B ◆ R 2 + ω 2 L 2 ◆ R B ◆ ◆ L B ◆ R 2 + ω 2 L 2 ◆ R B ◆ = L ◆ B ◆ V 0 ◆ R B ◆◆ L B ◆ R 2 + ω 2 L 2 ◆ R B ◆ .
(d) When ω → 0 \omega \to 0 ω → 0 (DC circuit): amplitude → V 0 R = I 0 \to \frac{V_0}{R} = I_0 → R V 0 = I 0 . The current approaches
V 0 / R V_0/R V 0 / R with time constant L / R L/R L / R . This is the classic RL circuit charging: the inductor initially
opposes current flow, but as the magnetic field builds, the current asymptotically approaches
V 0 / R V_0/R V 0 / R .