The given differential equation is:
cos x ( 3 sin x + cos x + 3 ) d y = ( 1 + y sin x ( 3 sin x + cos x + 3 )) d x
To solve this, we first rearrange the equation into the standard form of a
Linear Differential Equation (LDE) :
d x d y + P ( x ) y = Q ( x )
Dividing both sides by
d x and the term
cos x ( 3 sin x + cos x + 3 ) , we obtain:
d x d y = cos x ( 3 sin x + cos x + 3 ) 1 + y sin x ( 3 sin x + cos x + 3 )
We split the fraction on the right-hand side into two distinct parts:
d x d y = cos x ( 3 sin x + cos x + 3 ) 1 + cos x ( 3 sin x + cos x + 3 ) y sin x ( 3 sin x + cos x + 3 )
The term
( 3 sin x + cos x + 3 ) cancels out in the second part, leaving us with
y tan x . Moving this term to the left side yields the standard LDE form:
d x d y − ( tan x ) y = cos x ( 3 sin x + cos x + 3 ) 1
To solve this LDE, we calculate the
Integrating Factor (I.F.) :
I . F . = e ∫ P ( x ) d x = e ∫ − t a n x d x = e l n ∣ c o s x ∣ = cos x
Multiplying the entire LDE by
cos x , the left side becomes the derivative of the product
y cos x . The right side simplifies significantly:
d x d ( y cos x ) = 3 sin x + cos x + 3 1
Integrating both sides, we must solve:
y cos x = ∫ 3 sin x + cos x + 3 d x
We apply the half-angle substitution
t = tan ( 2 x ) , where
sin x = 1 + t 2 2 t ,
cos x = 1 + t 2 1 − t 2 , and
d x = 1 + t 2 2 d t :
y cos x = ∫ 3 ( 1 + t 2 2 t ) + ( 1 + t 2 1 − t 2 ) + 3 1 + t 2 2 d t
Simplifying the denominator leads to:
y cos x = ∫ 2 t 2 + 6 t + 4 2 d t = ∫ t 2 + 3 t + 2 d t
Using partial fractions, we resolve the integral:
y cos x = ∫ ( t + 1 1 − t + 2 1 ) d t = ln t + 2 t + 1 + C Substituting
t = tan ( 2 x ) back into the equation, the general solution is:
y cos x = ln tan ( 2 x ) + 2 tan ( 2 x ) + 1 + C Using the initial condition
y ( 0 ) = 0 , we find
0 = ln ( 1/2 ) + C , which implies
C = ln 2 . Thus, the particular solution is:
y cos x = ln tan ( 2 x ) + 2 2 ( tan ( 2 x ) + 1 ) Evaluating at
x = 3 π , where
cos ( 3 π ) = 2 1 and
tan ( 6 π ) = 3 1 , we arrive at the final result: