Solveeit Logo

Question

Question: Solve \(\dfrac{{dy}}{{dx}} + 2y = \sin x\)...

Solve dydx+2y=sinx\dfrac{{dy}}{{dx}} + 2y = \sin x

Explanation

Solution

In the question we are given a linear differential equation. To understand this question properly we will first understand the meaning of linear differential equation and method to solve it. Then we will find the integrating factor of our given equation and using that we will find the general solution of our given differential equation.

Complete step by step solution:
Linear Differential Equation:
Linear Differential Equation is the differential equation in which order and degree of differential equation is one.
General form of linear differential equation is represented as
dydx+P(x)y=Q(x)\dfrac{{dy}}{{dx}} + P(x)y = Q(x) Where PP and QQ are functions of xx
For solving linear differential equation
First we calculate integrating factor of the equation
Formula for integrating factor (I.F)(I.F) is
I.F=ePdxI.F = {e^{\int_{}^{} {Pdx} }}
Then using this we calculate general solution of linear differential equation.
y×I.F=Q×I.Fdxy \times I.F = \int_{}^{} {Q \times I.Fdx}
Remember in this linear differential equation xx is independent variable and yy is dependent variable.
Now let us proceed to our equation.
In the question we are given a linear differential equation.
General form of a linear differential equation is
dydx+P(x)y=Q(x)\dfrac{{dy}}{{dx}} + P(x)y = Q(x) Where PP and QQ are functions of xx
Our given equation is
dydx+2y=sinx\dfrac{{dy}}{{dx}} + 2y = \sin x
Comparing it with general equation we get
P=2 Q=sinx  P = 2 \\\ Q = \sin x \\\
Now we will calculate Integrating Factor (I.F)(I.F)
Formula for integrating factor is
I.F=ePdxI.F = {e^{\int_{}^{} {Pdx} }}
According to our given equation
P=2P = 2
Substituting value of PP .
I.F=e2dxI.F = {e^{\int_{}^{} {2dx} }}
As we know adx=ax+c\int_{}^{} {adx = ax + c} where aa is any constant and cc is an integrating constant.
Here we will not consider cc in integrating factor
So
I.F=e2xI.F = {e^{2x}}
Now we will find general solution of our given equation
General solution of a linear differential equation is given as
y×I.F=Q×I.Fdxy \times I.F = \int_{}^{} {Q \times I.Fdx}
Substituting the values of I.FI.F and QQ
I.F=e2xI.F = {e^{2x}}
Q=sinxQ = \sin x
General solution is
y×e2x=sinx×e2xdxy \times {e^{2x}} = \int_{}^{} {\sin x \times {e^{2x}}dx}
We can write it as
ye2x=sinxe2xdxy{e^{2x}} = \int_{}^{} {\sin x{e^{2x}}dx}
ye2x=e2xsinxdx\Rightarrow y{e^{2x}} = \int_{}^{} {{e^{2x}}\sin xdx}
We can use a direct formula of integration here
eaxsinbxdx=eaxa2+b2(asinbxbcosbx)+C\int_{}^{} {{e^{ax}}\sin bxdx = \dfrac{{{e^{ax}}}}{{{a^2} + {b^2}}}(a\sin bx - b\cos bx) + C}
Comparing it with the integral we have to find
a=2 b=1  a = 2 \\\ b = 1 \\\
Now we will substitute this in the formula
e2xsin1xdx=e2x22+12(2sin1x1cos1x)+C\int_{}^{} {{e^{2x}}\sin 1xdx = \dfrac{{{e^{2x}}}}{{{2^2} + {1^2}}}(2\sin 1x - 1\cos 1x) + C}
We can write it as
e2xsinxdx=e2x22+12(2sinxcosx)+C\int_{}^{} {{e^{2x}}\sin xdx = \dfrac{{{e^{2x}}}}{{{2^2} + {1^2}}}(2\sin x - \cos x) + C}
Simplifying this
e2xsinxdx=e2x4+1(2sinxcosx)+C e2xsinxdx=e2x5(2sinxcosx)+C  \int_{}^{} {{e^{2x}}\sin xdx = \dfrac{{{e^{2x}}}}{{4 + 1}}(2\sin x - \cos x) + C} \\\ \Rightarrow \int_{}^{} {{e^{2x}}\sin xdx = \dfrac{{{e^{2x}}}}{5}(2\sin x - \cos x) + C} \\\
Now we will substitute this in our general solution.
ye2x=e2xsinxdx ye2x=e2x5(2sinxcosx)+C  y{e^{2x}} = \int_{}^{} {{e^{2x}}\sin xdx} \\\ \Rightarrow y{e^{2x}} = \dfrac{{{e^{2x}}}}{5}(2\sin x - \cos x) + C \\\
\therefore General solution of our given linear differential equation dydx+2y=sinx\dfrac{{dy}}{{dx}} + 2y = \sin x is ye2x=e2x5(2sinxcosx)+Cy{e^{2x}} = \dfrac{{{e^{2x}}}}{5}(2\sin x - \cos x) + C , where CC is an integrating constant.

Note: A differential equation is an equation which involves derivatives. To solve differential equations of first order and first degree we have four main methods named as variable separable, reducible to variable separable, homogeneous equation method and solving by using integrating factor.