MATH 334 - DIFFERENTIAL
EQUATIONS - Ordinary differential
equations
Question Bank - Set 3
Liberty University
Question 1
Question
Find the general solution to the differential equation:
y′′ −4y′+ 4y= 0
Solution
We are given the differential equation:
y′′ −4y′+ 4y= 0
Step 1: Find the characteristic equation by assuming the solution is in the
form y=ert. The characteristic equation is:
r2−4r+ 4 = 0
Step 2: Solve the characteristic equation. Factoring the characteristic equa-
tion gives:
(r−2)2= 0
So, r= 2 with multiplicity 2.
Step 3: Write down the general solution. Since we have a repeated root,
the general solution is:
y(t)=(c1+c2t)e2t
where c1and c2are arbitrary constants. Thus, the general solution to the
differential equation y′′ −4y′+ 4y= 0 is y(t)=(c1+c2t)e2t.
Question 2
Question
Find the general solution of the differential equation: y′′ −4y′+ 4y=e2x.
Solution
To solve the differential equation y′′ −4y′+ 4y=e2x, we can first find the
complementary function by solving the characteristic equation r2−4r+ 4 = 0.
Step 1: Find the roots of the characteristic equation r2−4r+ 4 = 0.
r2−4r+ 4 = 0
(r−2)2= 0
r= 2 (Repeated root)
Step 2: Write down the complementary function. The complemen-
tary function yc(x) is given by:
yc(x)=(c1+c2x)e2x
Step 3: Find a particular solution for yp(x).Since e2xis already part
of the complementary function, we try a particular solution of the form:
yp(x) = Axe2x
where Ais a constant to be determined.
Step 4: Calculate the derivatives of yp(x)and substitute into the
differential equation.
y′
p= (2A+Ax)e2x
y′′
p= (4A+ 4Ax)e2x
Substitute yp,y′
p, and y′′
pinto the differential equation:
(4A+ 4Ax −4(2A+Ax) + 4(Axe2x)) = e2x
4A+ 4Ax −8A−4Ax + 4Axe2x=e2x
−4A+ 4Ae2x=e2x
A(e2x−1) = e2x
A=e2x
e2x−1
Therefore, A=1
1−e−2x. So, the particular solution is:
yp(x) = x
1−e−2xe2x
Step 5: Write down the general solution. The general solution to the
differential equation is the sum of the complementary function and the particular
solution:
y(x) = yc(x) + yp(x) = (c1+c2x)e2x+x
1−e−2xe2x
2
Question 3
Question
Solve the following first-order ordinary differential equation:
dy
dx =y(1 −y)
Solution
Step 1: We start by separating variables. Let’s write the equation in the form
dy
dx =f(x)g(y), where f(x) = 1 and g(y) = y(1 −y).
dy
dx =y(1 −y)
Step 2: Now, we separate variables and integrate both sides:
Z1
y(1 −y)dy =Zdx
Step 3: We decompose the partial fractions:
1
y(1 −y)=A
y+B
1−y
Step 4: We find Aand Bby multiplying through by y(1 −y) and then
substituting values of ythat will make either the yor the 1 −yterms disappear.
1 = A(1 −y) + By
Step 5: Solve for Aand Bby substituting y= 0 and y= 1.
1 = A(1 −0) + B(0) =⇒A= 1
1 = A(0) + 1(1) =⇒B= 1
Step 6: Substitute A= 1 and B= 1 back into the partial fractions decom-
position:
Z1
y+1
1−ydy =Zdx
Step 7: Integrate both sides:
Z1
ydy +Z1
1−ydy =Zdx
Step 8: Solve the integrals to obtain:
ln |y| − ln |1−y|=x+C
3
Step 9: Combine the logarithms:
ln
y
1−y
=x+C
Step 10: Exponentiate both sides:
y
1−y=ex+C=Cex
Step 11: Solve for yby multiplying both sides by 1 −y:
y=Cex(1 −y)
Step 12: Expand and solve for y:
y=Cex−Cy
y+Cy =Cex
y(1 + C) = Cex
y=Cex
1 + C
So the general solution to the differential equation is y=Cex
1+C.
Question 4
Question
Solve the following first-order ordinary differential equation:
dy
dx =x+y
x−y
4
Solution
To solve this ordinary differential equation, we will use the method of separation
of variables.
dy
dx =x+y
x−y
dy
dx(x−y) = x+y
xdy
dx −ydy
dx =x+y
xdy
dx −ydy
dx =x+y
xdy
dx −ydy
dx =x+y|factor out dy
dx and move terms with ytogether
xd
dx(y)−y=x+y|Apply the quotient rule for differentiation
xy′−y=x+y
xy′−y′=x+y|Collect all terms involving y′
y′(x−1) = x+y
y′=x+y
x−1
y′=x
x−1+y
x−1|Split into partial fractions
y′= 1 + 1
x−1y
Now we can solve this first-order differential equation using the integrating factor
method. Let v(x) = eR1
x−1dx =eln |x−1|=|x−1|.
dy
dx −1 = 1
x−1y
|x−1|dy
dx − |x−1|=y
|x−1|y′− |x−1|=y
|x−1|y′−y=|x−1|
d
dx(|x−1|y) = |x−1|
Integrating both sides with respect to x:
|x−1|y=Z|x−1|dx
|x−1|y=1
2x|x−1|+C
5
Therefore, the general solution to the differential equation is y(x) = 1
2x+C,
where Cis a constant.
Question 5
Question
Consider the differential equation: dy
dx =2x+y+1
x−2y−1.
a) Show that it is an exact differential equation.
b) Solve the differential equation by finding the integrating factor and inte-
grating.
Solution
a) To show that the differential equation is exact, we need to check if ∂M
∂y =∂N
∂x
where M= 2x+y+ 1 and N=x−2y−1.
Step 1: Calculate the partial derivatives:
∂M
∂y = 1 and ∂N
∂x = 1
Since ∂M
∂y =∂N
∂x , the differential equation is exact.
b) To solve the differential equation, we need to find the integrating factor.
Let u(x, y) be the integrating factor.
Step 2: The integrating factor u(x, y) is given by
u=eR
∂M
∂y
−∂N
∂x
Ndx
Calculating,
∂M
∂y −∂N
∂x
N=0
x−2y−1= 0
Therefore, the integrating factor u(x, y) = 1.
Step 3: Multiply the given differential equation with the integrating factor
u(x, y) = 1:
(2x+y+ 1)dx + (x−2y−1)dy = 0
Step 4: Integrate the above equation by considering dy =−2x+y+1
x−2y−1dx.
Integrating both sides, we get:
Z1dy =Z−2x+y+ 1
x−2y−1dx
Integrating further, we find:
y=−x−ln |x−2y−1|+C
where Cis the constant of integration.
Therefore, the solution to the given differential equation is y=−x−ln |x−
2y−1|+C.
6
Question 6
Question
Find the general solution to the differential equation: dy
dx =y2−1
x.
Solution
Step 1: Rewrite the differential equation in a separable form by moving all terms
involving yto one side and all terms involving xto the other side:
dy
y2−1=dx
x
Step 2: Integrate both sides with respect to their respective variables:
Zdy
y2−1=Zdx
x
Step 3: To integrate the left side, we use partial fractions. First, factor the
denominator:
y2−1=(y−1)(y+ 1)
Step 4: Rewrite the left side using partial fractions. Let Aand Bbe con-
stants: 1
y2−1=A
y−1+B
y+ 1
Step 5: Clear fractions and solve for Aand Bby comparing coefficients.
This gives:
1 = A(y+ 1) + B(y−1)
Step 6: Substitute y= 1 to find A:
1 = A(1 + 1) ⇒A=1
2
Step 7: Substitute y=−1 to find B:
1 = B(−1−1) ⇒B=−1
2
Step 8: Now we integrate the left side using the partial fractions:
Z1
2(y−1) −1
2(y+ 1)dy =Zdx
x
Step 9: Integrate both sides:
1
2ln |y−1| − 1
2ln |y+ 1|= ln |x|+C
7
Step 10: Combine the logarithmic terms on the left side:
ln
y−1
√y+ 1
= 2 ln |x|+C
Step 11: Exponentiate both sides to eliminate the logarithm:
y−1
√y+ 1 =e2 ln |x|+C
Step 12: Simplify the right side:
y−1
√y+ 1 =eC·x2
Step 13: Solve for yto find the general solution:
y−1 = eC·x2·py+ 1
y= 1 + eC·x2·py+ 1
Question 7
Question
Consider the differential equation:
dy
dx =x+y
x−y
Find the general solution to the given differential equation.
Solution
Step 1: Rewrite the differential equation in a separable form by multiplying
through by (x−y):
(x−y)dy
dx =x+y
Step 2: Rearrange the equation to separate variables:
(x−y)dy = (x+y)dx
Step 3: Integrate both sides with respect to yand x:
Z(x−y)dy =Z(x+y)dx
8
Step 4: Solve the integrals separately:
Z(x−y)dy =Z(x+y)dx
xy −y2
2=x2+y2
2+C
2xy −2y2= 2x2+y2+C
Step 5: Rearrange the equation to obtain the general solution:
y2−2xy +y2+ 2x2=C
2y2−2xy =C−2x2
y=x±pC−2x2
Therefore, the general solution to the given differential equation is y=x±
√C−2x2, where Cis an arbitrary constant.
Question 8
Question
Consider the differential equation:
dy
dx = 2xye−x2
Find the general solution to the differential equation.
Solution
Step 1: Rewrite the differential equation in a form suitable for separation of
variables. dy
dx = 2xye−x2
Step 2: Separate variables by bringing all terms involving y to one side and
all terms involving x to the other side.
dy
y= 2xe−x2dx
Step 3: Integrate both sides with respect to their respective variables.
Z1
ydy =Z2xe−x2dx
Step 4: Integrate the left side to get ln |y|and simplify the right side using
a substitution u=−x2.
ln |y|=−e−x2+C
9
Step 5: Exponentiate both sides to solve for y.
y=±e−e−x2+C
Step 6: Apply the property of exponents to simplify the solution.
y=±eCe−e−x2
Step 7: Combine the constants C1=±eCand rewrite the solution.
y=C1e−e−x2
Therefore, the general solution to the differential equation is y=C1e−e−x2
,
where C1is an arbitrary constant.
Question 9
Question
Consider the following first-order linear ordinary differential equation:
dy
dx + (1 + 3x)y= 0
Find the general solution to this differential equation.
Solution
Step 1: This is a first-order linear ordinary differential equation of the form:
dy
dx +P(x)y= 0
where P(x) = 1 + 3x.
Step 2: To solve this type of ODE, we can multiply through by an in-
tegrating factor µ(x) = eRP(x)dx. So, the integrating factor in this case is
µ(x) = eR(1+3x)dx.
Step 3: Calculating the integrating factor:
Z(1 + 3x)dx =x+3
2x2
µ(x) = ex+3
2x2=ex·e3
2x2
Step 4: Multiplying through by the integrating factor:
ex·e3
2x2dy
dx +ex·e3
2x2(1 + 3x)y= 0
10
Step 5: Rewriting the equation using the product rule:
d
dx ex·e3
2x2y= 0
Step 6: Integrating both sides:
Zd
dx ex·e3
2x2ydx =Z0dx
ex·e3
2x2y=C
where Cis the constant of integration.
Step 7: Therefore, the general solution to the differential equation is:
y=Ce−xe−3
2x2
Question 10
Question
Consider the differential equation:
y′+ 2xy =x2
Find the general solution to the above differential equation.
Solution
Step 1: First, we identify the integrating factor. The integrating factor is given
by:
µ(x) = eR2x dx
µ(x) = ex2
Step 2: Multiply the given differential equation by the integrating factor:
ex2y′+ 2xex2y=x2ex2
Step 3: Recognize that the left hand side can be rewritten using the product
rule: d
dx(ex2y) = x2ex2
Step 4: Integrate both sides with respect to x:
Zd
dx(ex2y)dx =Zx2ex2dx
ex2y=1
2x2ex2+C
11
Step 5: Solve for y by dividing throughout by ex2:
y=1
2x2+Ce−x2
So, the general solution to the differential equation is:
y=1
2x2+Ce−x2
where Cis an arbitrary constant.
Question 11
Question
Solve the following initial value problem:
y′+ 2y=x2, y(0) = 1
Solution
Step 1: First, we find the integrating factor by solving the differential equation
v′(x)=2v(x):
dv
v= 2dx
Integrating both sides, we get:
ln |v|= 2x+C
where Cis the constant of integration. Exponentiating both sides gives:
v=e2x+C=Ae2x
where A=eCis a constant.
Step 2: Now, we multiply the integrating factor by both sides of the differ-
ential equation to obtain:
e2xy′+ 2e2xy=x2e2x
This can be rewritten as:
(e2xy)′=x2e2x
Step 3: Integrating both sides with respect to xgives:
e2xy=Zx2e2xdx
e2xy=1
4x2e2x−1
4Zx2e2xdx
12
Step 4: To solve the integral term, we use integration by parts (u=x2,
dv =e2xdx):
Zx2e2xdx =1
4x2e2x−1
2Zxe2xdx
Step 5: Using integration by parts again for the remaining integral (u=x,
dv =e2xdx) gives:
Zxe2xdx =1
2xe2x−1
2Ze2xdx
Step 6: Integrating the last integral above, we get:
Ze2xdx =1
2e2x+C1
Step 7: Substitute the results back into the equation found in Step 3 and
simplify to solve for y.
Step 8: Finally, apply the initial condition y(0) = 1 to determine the value
of the constant C1.
Question 12
Question
Consider the following first-order ordinary differential equation:
dy
dx =1
x+y.
Find the general solution to this differential equation.
Solution
Step 1: This is a first-order linear ordinary differential equation of the form
dy
dx +P(x)y=Q(x). To solve this equation, we first need to find an integrating
factor I(x) defined as:
I(x) = eRP(x)dx.
Here, P(x) = 1. So the integrating factor I(x) is given by:
I(x) = eR1dx =ex.
Step 2: Multiply the given differential equation by the integrating factor
I(x):
exdy
dx +exy=ex·1
x.
Step 3: Rewrite the left-hand side as the derivative of a product:
d
dx(exy) = ex·1
x.
13
Step 4: Integrate both sides with respect to x:
Zd
dx(exy)dx =Zex·1
xdx.
Step 5: Solve the integrals:
exy=Zex·1
xdx =Z1
xdx = ln |x|+C.
Step 6: Solve for y:
y=e−x(ln |x|+C).
Therefore, the general solution to the given differential equation is y=
e−x(ln |x|+C), where Cis an arbitrary constant.
Question 13
Question
Solve the following initial value problem:
dy
dx =2x+y
x, y(1) = 3
Solution
Step 1: Rewrite the given differential equation in standard form by multiplying
both sides by x:
xdy
dx −2y=y
Step 2: This is now a first-order linear differential equation in the standard
form dy
dx +P(x)y=Q(x), where P(x) = −2 and Q(x) = x.
Step 3: The integrating factor I(x) is given by I(x) = eRP(x)dx.
I(x) = eR−2dx
=e−2x
Step 4: Multiply the integrating factor with the standard form equation:
e−2xxdy
dx −2y=e−2xy
Step 5: Recognize the left side as the derivative of the product of yand e−2x
using the product rule:
d
dx ye−2x=e−2xy+ (−2)e−2xy
14
Step 6: Integrate both sides with respect to x:
Zd
dx ye−2xdx =Ze−2xydx
ye−2x=Ze−2xydx +C
Step 7: Solve for yby isolating it on one side:
y=e2xZe−2xydx +C
y=e2xZe−2xydx+Ce2x
Step 8: Since Re−2xydx appears on both sides of the equation, we choose a
suitable guess function for yto continue deriving a solution.
Question 14
Question
Consider the first-order ordinary differential equation:
dy
dx =y+x2−1
Solve this differential equation using the method of integrating factors.
Solution
Step 1: Write the given differential equation in the form dy
dx +P(x)y=Q(x):
dy
dx −y=x2−1
Step 2: Identify P(x) and Q(x):
P(x) = −1
Q(x) = x2−1
Step 3: Find the integrating factor µ(x) = eRP(x)dx:
µ(x) = eR−1dx =e−x
Step 4: Multiply both sides of the differential equation by the integrating
factor µ(x):
e−xdy
dx −e−xy= (x2−1)e−x
15
Step 5: Rewrite the left side as the derivative of the product (e−xy):
d
dx(e−xy)=(x2−1)e−x
Step 6: Integrate both sides with respect to x:
Zd
dx(e−xy)dx =Z(x2−1)e−xdx
Step 7: Solve the integrals on the right side:
e−xy=−e−x(x2+ 2x+ 2) + C
Step 8: Solve for y:
y=−(x2+ 2x+ 2) + Cex,where Cis the constant of integration
Therefore, the solution to the differential equation is y=−(x2+2x+2)+Cex.
Question 15
Question
Solve the following first-order ordinary differential equation:
dy
dx =2x+y
x
Solution
Step 1: Rewrite the equation in standard form by separating variables.
dy
dx =2x+y
x
xdy
dx = 2x+y
Step 2: Rearrange the equation to separate variables.
xdy
dx −y= 2x
Step 3: Recognize that the equation is in the standard form for an integrating
factor.
I(x) = eR−1
xdx =e−ln |x|=1
|x|=1
x(since x > 0)
Step 4: Multiply both sides of the separated equation by the integrating
factor.
x·1
x
dy
dx −y
x= 2
16
Step 5: Simplify the equation.
d
dx(y/x)=2
Step 6: Integrate both sides with respect to x.
Zd
dx(y/x)dx =Z2dx
y
x= 2x+C
Step 7: Solve for y.
y= 2x2+Cx
Therefore, the general solution to the given ordinary differential equation is
y= 2x2+Cx, where Cis an arbitrary constant.
Question 16
Question
Consider the differential equation dy
dx =2x+y
3x−2y. Find the general solution of the
given differential equation.
Solution
Step 1: Rewrite the given differential equation in standard form by separating
variables. dy
dx =2x+y
3x−2y
3x−2y dy = (2x+y)dx
Step 2: Expand the left-hand side and group terms involving xand y
together.
3x dx −2y dy = 2x dx +y dx
(3x−2x)dx = (y+ 2y)dy
x dx = 3y dy
Step 3: Integrate both sides to find the general solution.
Zx dx =Z3y dy
1
2x2=3
2y2+C
Step 4: Rearrange the equation to obtain the general solution.
x2= 3y2+C
x2−3y2=C
Therefore, the general solution of the given differential equation is x2−3y2=
C, where Cis an arbitrary constant.
17
Question 17
Question
Consider the following differential equation:
dy
dx + 2y= 4x2e−2x
Find the particular solution to the differential equation given that y(0) = 1.
Solution
Step 1: First, we solve the homogeneous equation dy
dx + 2y= 0. The solution to
the homogeneous equation is yh(x) = Ce−2x, where Cis a constant.
Step 2: Next, we find a particular solution to the given non-homogeneous
equation. We assume the particular solution has the form yp(x) = Ax2e−2x,
and then find the derivatives:
dyp
dx =A(2xe−2x−2x2e−2x)
d2yp
dx2=A(−4xe−2x+ 4x2e−2x−4e−2x)
Step 3: Substituting ypand its derivatives into the original differential equa-
tion, we get:
A(−4xe−2x+ 4x2e−2x−4e−2x) + 2(Ax2e−2x)=4x2e−2x
Step 4: Simplifying the above equation, we find:
A(−4xe−2x+ 4x2e−2x−4e−2x+ 2x2e−2x)=4x2e−2x
Step 5: Equating coefficients, we get:
A(−4x+ 4x2−4+2x2)=4x2
Step 6: This simplifies to:
A(6x2−4x−4) = 4x2
Step 7: Solving for A, we find A=−4x2
6x2−4x−4.
Step 8: Therefore, the particular solution is yp(x) = −4
6x2e−2x.
Step 9: The general solution is given by the sum of the homogeneous and
particular solutions:
y(x) = yh(x) + yp(x) = Ce−2x−2
3x2e−2x
Step 10: Using the initial condition y(0) = 1, we find:
1 = C−2
3·02·e0=C
Step 11: Finally, the particular solution to the differential equation is y(x) =
e−2x−2
3x2e−2x.
18
Question 18
Question
Find the general solution to the differential equation: dy
dx =3x2+2x+1
x(y+1) .
Solution
Step 1: Rewrite the given differential equation in a more convenient form.
dy
dx =3x2+ 2x+ 1
x(y+ 1)
=⇒x(y+ 1) dy = (3x2+ 2x+ 1) dx
Step 2: Integrate both sides of the equation.
Zx(y+ 1) dy =Z(3x2+ 2x+ 1) dx
=⇒Zxy +x dy =Z3x2+ 2x+ 1 dx
=⇒x2y
2+x=x3+x2+x+C
Step 3: Simplify the equation.
x2y
2+x=x3+x2+x+C
=⇒x2y+ 2x= 2x3+ 2x2+ 2x+C
Step 4: Divide by x2to obtain the general solution.
y= 2x+2
x+2
x2+C
x2
Question 19
Question
Find the general solution to the differential equation: y′′ −5y′+ 6y= 0.
19
Solution
Step 1: Write down the characteristic equation by assuming y=ert.
r2−5r+ 6 = 0
Step 2: Solve the characteristic equation to find the roots r1and r2.
(r−2)(r−3) = 0 ⇒r1= 2, r2= 3
Step 3: The general solution to the differential equation is
y(t) = c1e2t+c2e3t
where c1and c2are constants determined by initial conditions.
Question 20
Question
Solve the following initial value problem:
y′=y2+1
x, y(1) = 1
Solution
Step 1: First, we rewrite the differential equation in the form dy
dx =f(x, y):
y′=y2+1
x
Step 2: This is a separable differential equation, so we can separate the
variables and integrate both sides. We have:
dy
dx =y2+1
x
dy
y2+ 1/x =dx
Step 3: Now, we integrate both sides:
Zdy
y2+ 1/x =Zdx
Zdy
y2+ 1/x =x+C
Step 4: For the integral on the left side, we can rewrite it as:
Zdy
y2+1
x
=Zx·dy
xy2+ 1
20
Step 5: Next, we recognize that the integral Rxdy
xy2+1 can be solved using
substitution. Let u=xy, then du =ydx +xdy. Rearranging gives us xdy =
du −ydx.
Step 6: Substituting back into the integral gives us:
Zdu −ydx
u2+ 1 =x+C
Zdu
u2+ 1 −Zydx
u2+ 1 =x+C
Step 7: The first integral on the right side is a standard trigonometric inte-
gral, which evaluates to arctan(u).
Step 8: Substituting back u=xy gives us the solution:
arctan(xy)−arctan(1) = x+C
Step 9: Using the initial condition y(1) = 1, we find C=π
4−1.
Step 10: Therefore, the solution to the initial value problem is:
arctan(xy)−arctan(1) = x+π
4−1
Question 21
Question
Find the general solution of the differential equation: dy
dx =3x
x2−4.
Solution
Step 1: Rewrite the right-hand side to make it easier to integrate.
dy
dx =3x
x2−4=3x
(x+ 2)(x−2)
Step 2: Use partial fractions to decompose the expression.
3x
(x+ 2)(x−2) =A
x+ 2 +B
x−2
Step 3: Cross-multiply to solve for Aand B.
3x=A(x−2) + B(x+ 2)
Step 4: Substitute x= 2 to solve for A.
6=4A⇒A=3
2
21
Step 5: Substitute x=−2 to solve for B.
−6 = −4B⇒B=3
2
Step 6: Rewrite the original expression using the values of Aand B.
3x
(x+ 2)(x−2) =3/2
x+ 2 +3/2
x−2
Step 7: Integrate both sides with respect to x.
Zdy =Z3/2
x+ 2 +3/2
x−2dx
y=3
2ln |x+ 2|+3
2ln |x−2|+C
Step 8: Combine the natural logarithms into a single expression.
y=3
2ln |x+ 2
x−2|+C
Thus, the general solution of the differential equation is y=3
2ln |x+2
x−2|+C.
Question 22
Question
Find the general solution to the following differential equation:
y′′ + 2y′+y= sin(x)
Solution
To solve the given differential equation, we first find the complementary function
by solving the associated homogeneous equation:
y′′ + 2y′+y= 0
Step 1: Find the characteristic equation Let y=emx be a solution to
the homogeneous equation. Substitute y=emx into the homogeneous equation:
m2emx + 2memx +emx = 0
m2+ 2m+ 1 = 0
(m+ 1)2= 0
m=−1
22
Step 2: Write down the complementary function The complementary
function is
yc=c1e−x+c2xe−x
Step 3: Find a particular solution Let’s find a particular solution for
the non-homogeneous part sin(x). Since sin(x) is of the form sin or cos, we try
the particular solution of the form:
yp=Asin(x) + Bcos(x)
Step 4: Substitute the particular solution back into the differential
equation
y′′
p+ 2y′
p+yp= sin(x)
(−Asin(x)−Bcos(x)) + 2(Acos(x)−Bsin(x)) + (Asin(x) + Bcos(x)) = sin(x)
Grouping the terms with sin xand cos xseparately and solving for Aand B,
we find A=−1
2and B= 0.
Step 5: Write down the general solution Therefore, the general solution
to the differential equation is:
y=yc+yp=c1e−x+c2xe−x−1
2sin(x)
Question 23
Question
Solve the following first-order ordinary differential equation:
dy
dx =3y
x+x2
Solution
Step 1: We first identify the form of the equation as linear, where the ODE can
be expressed as: dy
dx +P(x)y=Q(x)
where P(x) = 3
xand Q(x) = x2.
Step 2: To solve the linear ODE, we use an integrating factor µ(x) given by:
µ(x) = eRP(x)dx
µ(x) = eR3
xdx =e3 ln |x|=x3
Step 3: Multiplying the integrating factor with the ODE, we get:
x3dy
dx + 3x2y=x5
23
Step 4: Notice that the left side can be expressed as the derivative of a
product by the product rule:
d
dx(x3y) = x5
Step 5: Integrating both sides yields:
x3y=x6
6+C
where Cis the constant of integration.
Step 6: Finally, to solve for y, we get:
y=x3
6+C
x3
Question 24
Question
Solve the initial value problem:
dy
dx = (1 −y2) sin x, y(0) = 0
Solution
Step 1: First, we separate variables by moving all terms involving yon one side
and all terms involving xon the other side. This gives:
dy
1−y2= sin x dx
Step 2: Next, we integrate both sides. For the left side, we can rewrite it
using partial fractions. Let y=A
1+y+B
1−y. This gives us A(1−y)+B(1+y) = 1,
which simplifies to y=1
21
1+y−1
1−y. Therefore, the integral becomes:
1
2Z1
1 + y−1
1−ydy =Zsin x dx
Step 3: Solving the integrals, we get:
1
2ln
1 + y
1−y
=−cos x+C
Step 4: Given the initial condition y(0) = 0, we substitute x= 0 and y= 0
into the equation and solve for the constant C:
1
2ln
1+0
1−0
=−cos 0 + C
24
1
2ln 1 = −1 + C
0 = −1 + C
C= 1
Step 5: Substituting C= 1 back into the equation, we get the final solution:
1
2ln
1 + y
1−y
=−cos x+ 1
Question 25
Question
Solve the following initial value problem:
y′+y= cos(x), y(0) = 1
Solution
Step 1: First, we find the integrating factor by considering the equation in the
form y′+p(x)y=q(x). Here, p(x) = 1 and q(x) = cos(x), so the integrating
factor is µ(x) = eRp(x)dx =eR1dx =ex.
Step 2: Next, we multiply the given differential equation by the integrating
factor:
exy′+exy=excos(x)
Step 3: The left-hand side of the equation can be written as the derivative
of the product exyusing the product rule:
(exy)′=excos(x)
Step 4: Integrating both sides with respect to x, we get:
exy=Zexcos(x)dx
Step 5: To solve the integral on the right-hand side, we use integration by
parts. Let u= cos(x) and dv =exdx. Then, du =−sin(x)dx and v=ex.
Thus,
Zexcos(x)dx =excos(x)−Zex(−sin(x)) dx
=excos(x) + Zexsin(x)dx
Step 6: We can now solve the remaining integral Rexsin(x)dx using inte-
gration by parts again. Let u= sin(x) and dv =exdx. Then, du = cos(x)dx
and v=ex. Therefore,
Zexsin(x)dx =exsin(x)−Zexcos(x)dx
25
Step 7: Substituting the result back into our previous integral, we get:
exy=excos(x) + exsin(x)−Zexcos(x)dx
Step 8: Rearranging terms, we find:
exy+Zexcos(x)dx =ex(cos(x) + sin(x))
Step 9: Finally, solving for y, we have:
y=e−x(cos(x) + sin(x)) + C
Step 10: Using the initial condition y(0) = 1, we can find the value of the
constant C:
1 = e0(cos(0) + sin(0)) + C
1 = 1 + C
C= 0
Therefore, the solution to the initial value problem is:
y=e−x(cos(x) + sin(x))
Question 26
Question
Find the general solution to the differential equation:
dy
dx =2x+ 3y
x+ 2y
Solution
Step 1: Rewrite the differential equation in a more suitable form:
(x+ 2y)dy = (2x+ 3y)dx
Step 2: Rearrange the terms to isolate dy on the left side and dx on the
right side: dy
y=2dx
x+3dx
y
Step 3: Integrate both sides of the equation separately:
Z1
ydy =Z2
xdx +Z3
ydx
26
Step 4: Solve the integrals:
ln |y|= 2 ln |x|+ 3 ln |y|+C
Step 5: Combine the logarithmic terms using properties of logarithms:
ln |y| − 3 ln |y|= 2 ln |x|+C
Step 6: Rewrite the equation in terms of exponential functions and simplify:
ln
y
y3
= ln |x2|+C
ln
1
y2
= ln |x2|+C
1
y2=x2eC
y2=1
x2eC
y=±1
x√eC
y=±A
x
where A=±1
√eCis a constant. Therefore, the general solution to the
differential equation is y=±A
x.
Question 27
Question
Consider the following initial value problem:
y′=2y
x+x2ex/y, y(1) = 1
Find the particular solution to the given initial value problem.
Solution
Step 1: First, rewrite the given initial value problem as:
y′−2y
x=x2ex/y
Step 2: This is a first-order linear differential equation in the form y′+
P(x)y=Q(x). The integrating factor is given by µ(x) = eRP(x)dx.
27
Step 3: Calculate the integrating factor:
µ(x) = eR−2
xdx =e−2 ln |x|=1
x2
Step 4: Multiply the integrating factor by the original differential equation:
1
x2y′−2
x3y=x2ex/y ·1
x2
Step 5: Simplify the result:
y′−2
xy=x2ex/y
Step 6: Now, rewrite the equation as a total differential:
d
dx(xy) = x2ex/y
Step 7: Integrate both sides:
Zd(xy) = Zx2ex/y dx
Step 8: Integrate and simplify:
xy =Zx2ex/y dx
Step 9: At this point, you may use numerical methods or software to ap-
proximate the integral if needed, as further analytical manipulation may be
complex.
Step 10: Finally, substitute y(1) = 1 into the particular solution to find the
specific solution to the initial value problem.
Question 28
Question
Consider the following differential equation:
dy
dx =x2+y2
2xy
Solve the differential equation using separation of variables.
28
Solution
Step 1: Rewrite the given differential equation in a suitable form for separation
of variables: dy
dx =x2+y2
2xy
⇒2xy dy = (x2+y2)dx
Step 2: Separate the variables by moving all terms involving xto one side
and all terms involving yto the other side:
2y dy =x2
x2+y2dx +y2
x2+y2dx
Step 3: Integrate both sides:
Z2y dy =Zx2
x2+y2dx +Zy2
x2+y2dx
y2= ln |x2+y2|+ arctan y
x+C
Step 4: Solve for y:
y2= ln |x2+y2|+ arctan y
x+C
y2−ln |x2+y2|= arctan y
x+C
Thus, the solution to the given differential equation is y2−ln |x2+y2|=
arctan y
x+C, where Cis the constant of integration.
Question 29
Question
Consider the initial value problem:
y′+ 2y=e−2t, y(0) = 1.
Find the particular solution to the differential equation that satisfies the initial
condition.
Solution
Step 1: First, we find the integrating factor for the differential equation y′+2y=
e−2t. The integrating factor is given by:
I(t) = eR2dt =e2t.
29
Step 2: Now, we multiply the integrating factor by both sides of the differ-
ential equation to obtain:
e2ty′+ 2e2ty=e2te−2t.
Step 3: Simplifying the equation, we get:
d
dt(e2ty) = 1.
Step 4: Integrating both sides with respect to t, we find:
e2ty=t+C,
where Cis the constant of integration.
Step 5: Applying the initial condition y(0) = 1, we have:
e2·0·1 = 0 + C,
C= 1.
Step 6: Substituting C= 1 back into the equation, we get:
e2ty=t+ 1.
Step 7: Solving for y, we have:
y=t+ 1
e2t.
Therefore, the particular solution to the differential equation that satisfies
the initial condition is y=t+1
e2t.
Question 30
Question
Consider the differential equation:
y′=1
(1 + x2)y
Find the particular solution to the differential equation with the initial con-
dition y(0) = 1.
30
Solution
To solve this first-order ordinary differential equation, we will use separation of
variables.
y′=1
(1 + x2)y
y dy =dx
1 + x2
Step 1: Integration of both sides Integrated both sides separately:
Zy dy =Zdx
1 + x2
y2
2= arctan(x) + C
where Cis the constant of integration.
Step 2: Apply initial condition Using the initial condition y(0) = 1, we
can find the value of the constant C.
12
2= arctan(0) + C
1
2= 0 + C
C=1
2
Step 3: Find the particular solution Substitute C=1
2back into the
general solution:
y2
2= arctan(x) + 1
2
y2= 2 arctan(x) + 1
2
y=s2arctan(x) + 1
2
Therefore, the particular solution to the differential equation with the initial
condition y(0) = 1 is:
y=s2arctan(x) + 1
2
Question 31
Question
Consider the first-order ordinary differential equation:
y′+ 2xy =x2, y(0) = 1.
31
Find the particular solution of the differential equation that satisfies the
initial condition.
Solution
Step 1: First, let’s rearrange the given first-order differential equation into a
standard form:
y′+ 2xy =x2.
Step 2: This is a linear differential equation of the form y′+P(x)y=Q(x),
where P(x)=2xand Q(x) = x2.
Step 3: To solve this linear differential equation, we will use an integrating
factor µ(x) = eRP(x)dx.
µ(x) = eR2xdx =ex2.
Step 4: Multiply both sides of the differential equation by the integrating
factor µ(x):
ex2y′+ 2xex2y=x2ex2.
Step 5: Notice that the left-hand side can be rewritten using the product
rule as (ex2y)′:
(ex2y)′=x2ex2.
Step 6: Integrate both sides with respect to x:
Z(ex2y)′dx =Zx2ex2dx.
Step 7: Integrate the right-hand side with a u-substitution where u=x2:
ex2y=Zx2ex2dx =1
2ex2+C,
where Cis the constant of integration.
Step 8: Solve for yby dividing by ex2:
y=1
2+Ce−x2.
Step 9: Apply the initial condition y(0) = 1 to find the value of the constant
C:
1 = 1
2+Ce0=1
2+C.
Step 10: Solve for C:
C=1
2.
Therefore, the particular solution to the differential equation that satisfies
the initial condition is:
y=1
2+1
2e−x2.
32
Question 32
Question
Given the differential equation:
dy
dx =2x
y2
(a) Determine the general solution to the differential equation.
(b) If y(0) = 1, find the particular solution to the initial value problem.
Solution
(a) To solve the differential equation, we rearrange it as follows:
y2dy = 2x dx
Integrating both sides, we get:
Zy2dy =Z2x dx
Step 1: Integrate the left side with respect to y:
1
3y3+C1=x2+C2
Step 2: Simplify and rearrange the equation:
y3= 3x2+C
Where C= 3C2−C1is an arbitrary constant.
(b) Given the initial condition y(0) = 1, we substitute x= 0 and y= 1 into
our general solution:
1 = 3(0)2+C
C= 1
Thus, the particular solution to the initial value problem is:
y3= 3x2+ 1
Question 33
Question
Find the general solution to the following differential equation:
y′′ −2y′+y=excos x
33
Solution
Step 1: First, we find the complementary function by solving the characteristic
equation r2−2r+ 1 = 0. This results in a repeated root r= 1. Therefore, the
complementary function is yc=c1ex+c2xex.
Step 2: Next, we find a particular solution to the given non-homogeneous
equation. Since excos xis a product of functions that are both solutions to
the homogeneous equation, we try a particular solution in the form yp=
x(Aexcos x+Bexsin x). Substitute ypback into the differential equation and
solve for Aand B.
Step 3: After solving for Aand B, add the complementary function to
the particular solution to obtain the general solution. Therefore, the general
solution to the differential equation is:
y=c1ex+c2xex+x1
5ex(cos x−sin x)
Question 34
Question
Consider the following first-order ordinary differential equation:
dy
dx =x+y
2x−y
Find the general solution of the given differential equation.
Solution
Step 1: Rewrite the given differential equation in a standard form by separating
variables. dy
dx =x+y
2x−y
dy
dx =x+y
2x−y·1
x
dy
dx =1 + y
x
2−y
x
Step 2: Introduce a new variable v=y
xand differentiate it with respect to
x.
y=vx
dy
dx =v+xdv
dx
Step 3: Substitute y=vx and dy
dx =v+xdv
dx back into the differential
equation.
v+xdv
dx =1 + v
2−v
34
Step 4: Solve for vin the above equation to separate variables.
v+xdv
dx =1 + v
2−v
v(2 −v) + xdv
dx(2 −v) = 1 + v
2v−v2+ 2xdv
dx −vx dv
dx =v+ 1
2v−v2+v(2xdv
dx −xdv
dx) = v+ 1
2v−v2+v(2xdv
dx −xdv
dx) = v+ 1
2v−v2−v= 1 −vx dv
dx
v= 1 −vx dv
dx
v+vx dv
dx = 1
Step 5: Solve the separated variables for vto find the general solution.
dv
dx =1−v
x
dv
1−v=dx
x
−ln |1−v|= ln |x|+ ln |C|
ln |1−v|=−ln |x| − ln |C|
1−v=1
Cx
v= 1 −1
Cx
v=Cx −1
Cx
Substitute back v=y
xto get the general solution:
y
x=Cx −1
Cx
y=xCx −1
Cx
y=Cx2−x
Cx
y=x(Cx −1)
C
Thus, the general solution to the given differential equation is y=x(Cx−1)
C.
35
Question 35
Question
Consider the initial value problem given by:
dy
dx =x2−y2
x2+y2, y(0) = 1.
Determine the solution to the initial-value problem.
Solution
Step 1: First, let’s rewrite the initial value problem in terms of separate vari-
ables: dy
x2−y2=dx
x2+y2.
Step 2: We can rewrite the left-hand side in partial fractions:
1
x2−y2=1
2y2−(y+y)(y−y)=1
2y2−y2−y2=1
y2(1 −0.5) =2
y2.
Step 3: On the right-hand side, rewrite using arctan in polar coordinates:
1
x2+y2=1
r2=1
r2(cos2θ+sin2θ) = 1
r2cos2θ+1
r2sin2θ=1
rcos θcos θ+1
rsin θcos θ=1
rcos θdr+1
rsin θdθ =d(arctany
x).
Step 4: Therefore, after integrating both sides, we get:
2 arctany
x+C= arctany
x.
Step 5: Consider the initial condition y(0) = 1. Substituting in the initial
condition gives:
2 arctan(0) + C= arctan(0) =⇒C= 0.
Step 6: Hence, the solution to the initial-value problem is given by:
2 arctany
x= arctany
x.
36