Question
Question: Solve \(\dfrac{{dy}}{{dx}} + 2y = \sin x\)...
Solve dxdy+2y=sinx
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
dxdy+P(x)y=Q(x) Where P and Q are functions of x
For solving linear differential equation
First we calculate integrating factor of the equation
Formula for integrating factor (I.F) is
I.F=e∫Pdx
Then using this we calculate general solution of linear differential equation.
y×I.F=∫Q×I.Fdx
Remember in this linear differential equation x is independent variable and y 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
dxdy+P(x)y=Q(x) Where P and Q are functions of x
Our given equation is
dxdy+2y=sinx
Comparing it with general equation we get
P=2 Q=sinx
Now we will calculate Integrating Factor (I.F)
Formula for integrating factor is
I.F=e∫Pdx
According to our given equation
P=2
Substituting value of P .
I.F=e∫2dx
As we know ∫adx=ax+c where a is any constant and c is an integrating constant.
Here we will not consider c in integrating factor
So
I.F=e2x
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.Fdx
Substituting the values of I.F and Q
I.F=e2x
Q=sinx
General solution is
y×e2x=∫sinx×e2xdx
We can write it as
ye2x=∫sinxe2xdx
⇒ye2x=∫e2xsinxdx
We can use a direct formula of integration here
∫eaxsinbxdx=a2+b2eax(asinbx−bcosbx)+C
Comparing it with the integral we have to find
a=2 b=1
Now we will substitute this in the formula
∫e2xsin1xdx=22+12e2x(2sin1x−1cos1x)+C
We can write it as
∫e2xsinxdx=22+12e2x(2sinx−cosx)+C
Simplifying this
∫e2xsinxdx=4+1e2x(2sinx−cosx)+C ⇒∫e2xsinxdx=5e2x(2sinx−cosx)+C
Now we will substitute this in our general solution.
ye2x=∫e2xsinxdx ⇒ye2x=5e2x(2sinx−cosx)+C
∴ General solution of our given linear differential equation dxdy+2y=sinx is ye2x=5e2x(2sinx−cosx)+C , where C 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.