Topics You Need To Understand For This Page
Differential Equations Alpha List
Tools
Differential Equations  Exam B2 
This page contains a complete differential equations exam with worked out solutions to all problems. This is exam 2 from semester B. 
Instructions:
 This exam is in four main parts, labeled sections 14, with different instructions for each section.
 Show all your work.
 For each problem, correct answers are worth 1 point. The remaining points are earned by showing calculations and giving reasoning that justify your conclusions.
 Correct notation counts (i.e. points will be taken off for incorrect notation).
 Give exact answers.
Find the general solution of each of the following differential equations. Each question in this section is worth 5 points.
Question 1 
\( y''2y'3y = 0 \)



\( \displaystyle{ y(t) = c_1 e^{t} + c^2 e^{3t} }\)

\( r^22r3 = (r3)(r+1) = 0 ~~~ \to ~~~ r=3, ~~~ r = 1 \)
Solutions to the characteristic equation are real and distinct.
\( \displaystyle{ y(t) = c_1 e^{t} + c^2 e^{3t} }\)
Question 1 Final Answer 
\( \displaystyle{ y(t) = c_1 e^{t} + c^2 e^{3t} }\)

Question 2 
\( y''2y'+y=0 \)



\(\displaystyle{ y(t) = c_1 e^t + c_2 t e^t }\)

\( r^2  2r + 1 = (r1)^2 = 0 ~~~ \to ~~~ r = 1, 1 \)
Solutions to the characteristic equation are real and equal.
\(\displaystyle{ y(t) = c_1 e^t + c_2 t e^t }\)
Question 2 Final Answer 
\(\displaystyle{ y(t) = c_1 e^t + c_2 t e^t }\)

Question 3 
\( y''2y'+5y=0 \)



\(\displaystyle{ y(t) = e^t [c_1 \cos(2t) + c_2 \sin(2t) ] }\)

\(
\begin{array}{rcl}
r^2  2r + 5 & = & 0 \\
r^2  2r + 1 & = & 5 + 1 \\
(r1)^2 & = & 4 \\
r1 & = & \pm 2i \\
r & = & 1 \pm 2i
\end{array}
\)
Solutions to the characteristic equation are complex.
\(\displaystyle{ y(t) = e^t [c_1 \cos(2t) + c_2 \sin(2t) ] }\)
Question 3 Final Answer 
\(\displaystyle{ y(t) = e^t [c_1 \cos(2t) + c_2 \sin(2t) ] }\)

Find the general solution to each of the following differential equations using the method of undetermined coefficients. Each question in this section is worth 10 points.
Question 4 
\(\displaystyle{ y''+4y=e^{2x} }\)



\( y = c_1 \cos(2x) + c_2 \sin(2x) + (1/8)e^{2x} \)

First, we need to solve the homogeneous equation \( y''+4y = 0 \).
\( r^2+4 = 0 ~~~ \to ~~~ r^2 = 4 ~~~ \to ~~~ r = \pm 2i \)
\( y_h = c_1 \cos(2x) + c_2 \sin(2x) \)
So the form of the nonhomogeneous solution is \( y_p(x) = Ae^{2x} \)
\( y'_p(x) = 2Ae^{2x} ~~~~~~ y''_p(x) = 4Ae^{2x} \)
\(\displaystyle{
\begin{array}{rcl}
y''_p + 4y_p & = & e^{2x} \\
4Ae^{2x} + 4(Ae^{2x}) & = & e^{2x} \\
8Ae^{2x} & = & e^{2x} \\
8A & = & 1 \\
A & = & 1/8
\end{array}
}\)
Combining the two solutions gives us the final answer, i.e. \( y = y_h + y_p \).
Question 4 Final Answer 
\( y = c_1 \cos(2x) + c_2 \sin(2x) + (1/8)e^{2x} \)

Question 5 
\(\displaystyle{ y''4y = e^{2x} }\)



\( y = c_1e^{2x} + c_2 e^{2x} + (x/4)e^{2x} \)

First, we need to find the solution to the homogeneous equation, \( y''4y=0 \).
\( r^24=0 ~~~ \to ~~~ r^2 = 4 ~~~ \to ~~~ r= \pm 2 \)
\( y_h(x) = c_1 e^{2x} + c_2 e^{2x} \)
Now the form of the nonhomogeneous (particular) solution is \( y_p(x) = Axe^{2x} \).
\(
\begin{array}{rcl}
y'_p & = & Ax(2e^{2x}) + Ae^{2x} = (2Ax+A)e^{2x} \\
y''_p & = & (2Ax+A)(2e^{2x}) + e^{2x}(2A) = (4Ax+2A+2A)e^{2x} = (4Ax+4A)e^{2x} \\
\end{array}
\)
\(
\begin{array}{rcl}
y''_p  4y_p & = & e^{2x} \\
(4Ax+4A)e^{2x}  4(Axe^{2x}) & = & e^{2x} \\
4Ae^{2x} & = & e^{2x} \\
4A & = & 1 \\
A & = & 1/4
\end{array}
\)
Combining the homogeneous and particular solutions gives us the complete solution, \( y = y_h + y_p \)
Question 5 Final Answer 
\( y = c_1e^{2x} + c_2 e^{2x} + (x/4)e^{2x} \)

Question 6 
\(\displaystyle{ y''2y'+y = (2x+1)e^x }\)



\( \displaystyle{ y = \left[ \frac{x^3}{3} + \frac{x^2}{2} + c_2 x + c_1 \right] e^x }\)

As before, we need to find the solutions to the homogeneous equation, \( y''2y'+y = 0 \)
\( r^2  2r = 0 ~~~ \to ~~~ (r1)^2 = 0 ~~~ \to ~~~ r=1 \) multiplicity 2
\( y_h = c^1 e^x + c_2 x e^x \)
So the form of the nonhomogeneous (particular) solution is \( y_p = (Ax+B)e^x (x^2) = (Ax^3+Bx^2)e^x \)
\(
\begin{array}{rcl}
y'_p & = & (Ax^3+Bx^2)e^x + e^x(3Ax^2+2Bx) = (Ax^3 + 3Ax^2 +Bx^2+2Bx)e^x \\
y''_p & = & (Ax^3 + 3Ax^2 +Bx^2+2Bx)e^x + e^x(3Ax^2+6Ax+2Bx+2B) \\
& = & (Ax^3 + 6Ax^2 + Bx^2 +4Bx +2B +6Ax) e^x
\end{array}
\)
\(
\begin{array}{rcl}
y''_p  2y'_p + y_p & = & (Ax^3 + 6Ax^2 + Bx^2 +4Bx +2B +6Ax) e^x \\
& & 2(Ax^3 + 3Ax^2 +Bx^2+2Bx)e^x \\
& & + (Ax^3 + Bx^2)e^x \\
& = & (6Ax + 2B)e^x = (2x+1)e^x
\end {array}
\)
Equating coefficients in the last equation yields
\( 2B = 1 ~~~ \to ~~~ B = 1/2 \)
\( 6A = 2 ~~~ \to ~~~ A = 1/3 \)
The final answer combines the results from the homogeneous and nonhomgeneous solutions, \( y = y_h + y_p \).
Question 6 Final Answer 
\( \displaystyle{ y = \left[ \frac{x^3}{3} + \frac{x^2}{2} + c_2 x + c_1 \right] e^x }\)

Solve the following problems.
Question 7 
[15 points] Use variation of parameters to find the general solution of \(\displaystyle{ y''4y'+4y = \sec^2(x)e^{2x} }\)



\(\displaystyle{ y = [ \ln\cos(x) + c_2 x + c_1 ] e^{2x} }\)

Homogeneous solution first. \( r^2  4r + 4 = (r2)^2 = 0 ~~~ \to ~~~ r = +2 \) multiplicity \(2\)
\( y_h = c_1 e^{2x} + c_2 x e^{2x} \)
Now, find the Wronskian.
\(\displaystyle{
W =
\begin{vmatrix}
y_{h1} & y_{h2} \\
y'_{h1} & y'_{h2}
\end{vmatrix}
= }\) \(\displaystyle{
\begin{vmatrix}
e^{2x} & xe^{2x} \\
2e^{2x} & (2x+1)e^{2x}
\end{vmatrix}
= }\) \(\displaystyle{ (2x+1)e^{4x}  2xe^{4x} = e^{4x}
}\)
Using variation of parameters, our nonhomogeneous solution looks like \( y=u_1(x)e^{2x} + u_2(x)xe^{2x} \).
Setting up the equations for \( u'_1(x) \) and \( u'_2(x) \), we have
\(\displaystyle{
u'_1 = \frac{
\begin{vmatrix}
0 & xe^{2x} \\
\sec^2 xe^{2x} & (2x+1)e^{2x}
\end{vmatrix}
}{W}
= \frac{x\sec^2 x e^{4x}}{e^{4x}} = x\sec^2 x
}\)
\(\displaystyle{
u'_2 = \frac{
\begin{vmatrix}
e^{2x} & 0 \\
2e^{2x} & \sec^2xe^{2x}
\end{vmatrix}
}{W} = \frac{\sec^2xe^{4x}}{e^{4x}} = \sec^2 x
}\)
So we need to solve the two equations
\(\displaystyle{ u'_1 = x \sec^2 x ~~~ \to ~~~ u_1 = \int{x\sec^2 x ~ dx} }\)
\(\displaystyle{ u'_2 = \sec^2 x ~~~ \to ~~~ u_2 = \int{\sec^2 x~dx} }\)
The first integral is solved in the practice problems on the integration by parts page. So we just give the result here.
\( \displaystyle{ u_1 = \int{x\sec^2 x ~ dx} = x\tan(x)\ln\cos(x)+k_1 }\)
The \second one is easy, since \( (\tan(x))' = \sec^2(x) \)
\(\displaystyle{ u_2 = \int{\sec^2 x~dx} = \tan(x)+k_2 }\)
To get our final answer, we substitute these results into the equation \( y=u_1e^{2x} + u_2xe^{2x} \) and simplify.
We also let \( c_1 = A+k_1\) and \( c_2 = B+k_2 \) to combine the constants.
Question 7 Final Answer 
\(\displaystyle{ y = [ \ln\cos(x) + c_2 x + c_1 ] e^{2x} }\)

Question 8 
[10 points] Determine the second fundamental solution of \( x^2y''6y=0 \), given \( y_1 = x^3 \)



\( y_2 = x^{2} \) is the second fundamental solution.

We will use the technique of Reduction of Order, where \( y_2 = vy_1 \) and \(v\) is a function of \(x\).
\(
\begin{array}{rcl}
y_2 & = & vy_1 \\
y'_2 & = & v(3x^2) + x^3 v' \\
y''_2 & = & v(6x) + 3x^2 v + x^3 v'' + 3x^2 v' = x^3 v'' + 6x^2 v' + 6xv \\
x^2 y''_2  6y_2 & = & x^2[ x^3 v'' + 6x^2 v' + 6xv]  6vx^3 \\
x^5 v'' + 6x^4 v' & = & 0
\end{array}
\)
Let \( u = v' \).
\(\displaystyle{
\begin{array}{rcl}
x^5 u' + 6x^4u & = & 0 \\
x^5 u' & = & 6x^4 u \\
\frac{u'}{u} & = & \frac{6}{x} \\
\frac{du}{u} & = & \frac{6}{x}dx \\
\lnu & = & 6\lnx + c_1 \\
u & = & c_1 x^{6} \\
v' & = & c_1 x^{6} \\
dv & = & c_1 x^{6}dx \\
v = \frac{c_1 x^{5}}{5} + k
\end{array}
}\)
\(\displaystyle{ y_2 = v x^3 = \left[ \frac{c_1 x^{5}}{5} + k \right] x^3 = \frac{c_1x^{2}}{5} + kx^3 }\)
let \( c = c_1 / (5) \)
\( y_2 = c/x^2 + kx^3 \)
Since \( kx^3 \) is a multiple of \( y_1 \) it is already included in \( y_1 \), so we just drop that term.
Question 8 Final Answer 
\( y_2 = x^{2} \) is the second fundamental solution.

Solve the following initial value problems.
Question 9 
[7 points] \( y''4y=0; \) \( y(0)=0, ~~~ y'(0)=1 \) 


\(\displaystyle{
y(t) = \frac{1}{4} e^{2t} + \frac{1}{4} e^{2t}
}\)

\( r^2  4 = 0 ~~~ \to ~~~ r^2 = 4 ~~~ \to ~~~ r = \pm 2 \)
\( y = c_1 e^{2t} + c_2 e^{2t} \)
Use the initial conditions to find the constants \( c_1 \) and \( c_2 \).
\( y(0) = c_1 + c_2 = 0 ~~~ \to ~~~ c_1 = c_2 \)
\(
\begin{array}{rcl}
y'(t) & = & 2c_1 e^{2t} + 2 c_2 e^{2t} \\
y'(0) & = & 2c_1 + 2c_2 = 1 \\
& & 2(c_2) + 2c_2 = 1 \\
& & 4c_2 = 1 \\
& & c_2 = 1/4 \\
& & c_1 = c_2 = 1/4
\end{array}
\)
Question 9 Final Answer 
\(\displaystyle{
y(t) = \frac{1}{4} e^{2t} + \frac{1}{4} e^{2t}
}\)

Question 10 
[8 points] \( y''+4y = e^{2x}; \) \( y(0)=1, \) \( y'(0)=3 \) 


\(\displaystyle{
y(x) = \frac{7}{8}\cos(2x) + \frac{11}{8}\sin(2x) + \frac{1}{8}e^{2x}
}\)

From question 4, we have the general solution
\(\displaystyle{ y = c_1 \cos(2x) + c_2 \sin(2x) + \frac{1}{8} e^{2x}}\)
Using the initial conditions to find the constants \(c_1\) and \(c_2\), we have
\( y(0) = c_1 + 1/8 = 1 ~~~ \to ~~~ c_1 = 11/8 = 7/8 \)
\(\displaystyle{ y'(x) = 2c_1 \sin(2x) + 2c_2 \cos(2x) + \frac{1}{8}(2)e^{2x} }\)
\( y'(0) = 2c_2 + 1/4 = 3 ~~~ \to ~~~ 2c_2 = 31/4 = 11/4 ~~~ \to ~~~ c_2 = 11/8 \)
Question 10 Final Answer 
\(\displaystyle{
y(x) = \frac{7}{8}\cos(2x) + \frac{11}{8}\sin(2x) + \frac{1}{8}e^{2x}
}\)

Question 11 
[15 points] \( y''+y'+1.25y = 5\sin(x); \) \( y(0)=y'(0)=0 \)



\(\displaystyle{
y(x) = e^{x/2}\left[ \frac{80}{17}\cos(x)  \right. }\) \(\displaystyle{ \left. \frac{20}{17}\sin(x) \right]  }\) \(\displaystyle{
\frac{80}{17}\cos(x) + }\) \(\displaystyle{ \frac{20}{17}\sin(x)
}\)
steady state occurs as \( x \to \infty \); so \( e^{x/2} \to 0 \) and
\(\displaystyle{
y_{ss}(x) = \frac{80}{17}\cos(x) + \frac{20}{17}\sin(x)
}\)

\(
\begin{array}{rcl}
r^2 + r +1.25 & = & 0 \\
r^2 + r + 1/4 & = & 5/4 + 1/4 \\
(r+1/2)^2 & = & 1 \\
r+1/2 & = & \pm i \\
r & = & 1/2 \pm i
\end{array}
\)
\( y_h = e^{x/2}[ c_1 \cos(x) + c_2 \sin(x) ] \)
\(
\begin{array}{rcl}
y_p & = & A\cos(x) + B\sin(x) \\
y'_p & = & A\sin(x) + B\cos(x) \\
y''_p & = & A\cos(x) B\sin(x)
\end{array}
\)
\(\displaystyle{
\begin{array}{rcl}
y''_p + y'_p + \frac{5}{4}y & = & [A\cos(x)  B\sin(x)] + [A\sin(x) + B\cos(x)] + \frac{5}{4}[A\cos(x) + B\sin(x)] \\
& = & [ A + B + 5A/4] \cos(x) + [ BA+5B/4 ] \sin(x) = 5\sin(x)
\end{array}
}\)
Equating coefficients, we have two equations and two unknowns.
cosine term   sine term 
\(B+A/4=0\)   \( A+B/4=5 \) 
\(4B+A=0\)   \(4A+B=20 \) 
  \( B=20+4A \) 
\( 4(20+4A)+A = 0\)   
\( 80+16A+A = 0\)   
\( 17A = 80 \)   
\( A = 80/17 \)   
  \( B = 20 + 4(80/17) \) 
  \( B = (340320)/17\) 
  \( B = 20/17 \) 
So far, we have \(\displaystyle{ y = e^{x/2}[ c_1 \cos(x) + c_2 \sin(x) ]  \frac{80}{17}\cos(x) + \frac{20}{17} \sin(x) }\)
Now we use the initial conditions to determine the constants \( c_1 \) and \( c_2 \).
\( y(0) = 1(c_1+0)  (80/17)(1) + 0 = 0 ~~~ \to ~~~ c_1 = 80/17 \)
\( y' = e^{x/2}[ c_1 \sin(x) + c_2 \cos(x) ] + (80/17)\sin(x) + (20/17)\cos(x) \)
\( y'(0) = 1(0+c_2) + 0 + 20/17 = 0 ~~~ \to ~~~ c_2 = 20/17 \)
Question 11 Final Answer 
\(\displaystyle{
y(x) = e^{x/2}\left[ \frac{80}{17}\cos(x)  \right. }\) \(\displaystyle{ \left. \frac{20}{17}\sin(x) \right]  }\) \(\displaystyle{
\frac{80}{17}\cos(x) + }\) \(\displaystyle{ \frac{20}{17}\sin(x)
}\)
steady state occurs as \( x \to \infty \); so \( e^{x/2} \to 0 \) and
\(\displaystyle{
y_{ss}(x) = \frac{80}{17}\cos(x) + \frac{20}{17}\sin(x)
}\)
