find the general solution to yytanx using variation of param
find the general solution to y\'\'\'+y\'=tanx using variation of parameter
Solution
y\'\'\' + y\' = 0
That is linear constant coefficient ODE with characteristic equation
r³ + r = 0
<=>
r(r² + 1) = 0
I t has a real root at 0 and two conjugate complex roots at ±i. Corresponding solutions are a constant function and sin(x) and cos(x). Hence a fundamental system of the homogeneous equation is:
y = 1
y = sin(x)
y = cos(x)
Variation of parameters methods assumes that general solution of the inhomogeneous equation takes the form:
y = vy + vy + vy
The functions v,v and v can be found by the integrals:
v_i = W_i / W dx
W is the Wronskian of the fundamental system. W_i is the same determinant as W but column i is replaced by < 0 , 0 ; f(x) > . f(x) is the function on right hand side of the inhomogeneous equation.
For you DE
.......|y.... y.... y|
W = |y\'... y\'.... y\'|
.......|y\'\'... y\'\'... y\'\'|
...|1.... sin(x).... cos(x)|
-cos²(x) - sin²(x) = -(sin²(x) + cos²(x)) = -1
....... |......... 0.......... sin(x).... cos(x)|
W = |....... .0.......... cos(x).... -sin(x)|
.........|sec(x)tan(x).. -sin(x)... .-cos(x)|
= sec(x)tan(x)(-sin²(x) - sec(x)tan(x)cos²(x) = -sec(x)tan(x)
........ |1........... 0.............. cos(x)|
W = |0........... 0.............. -sin(x)|
........ |0... sec(x)tan(x)).... -cos(x)|
= -sec(x)tan(x)(-sin(x)) = sin²(x)/cos³(x) = tan²(x)
........ |1..... sin(x)............. 0 .......|
W = |0..... cos(x)............. 0 ...... |
........ |0.... -sin(x)..... sec(x)tan(x)|
= cos(x)sec(x)tan(x) = tan(x)
v = W / W dx = -sec(x)tan(x) / (-1) dx = sin(x)/cos²(x) dx
= sin(x)/cos²(x) dx
= 1/cos(x) + C
= sec(x) + C
v = W / W dx = tan²(x) / (-1) dx
= 1 - (tan²(x) + 1) dx
= x - tan(x) + C
v = W / W dx = tan(x) / (-1) dx
= - tan(x) dx
= ln(cos(x)) + C
Hence,
y = (sec(x) + C)1 + x - (tan(x) + C)sin(x) + (ln(cos(x)) + C )cos(x)
= C + Csin(x) + Ccos(x) + sec(x) + xsin(x) - tan(x)sin(x) + ln(cos(x))cos(x)
= C + Csin(x) + Ccos(x) + sec(x) + xsin(x) - (sin²(x)cos(x)) + ln(cos(x))cos(x)
= C + Csin(x) + Ccos(x) + sec(x) + xsin(x) - ((1 - cos²(x))/cos(x)) + ln(cos(x))cos(x)
= C + Csin(x) + Ccos(x) + sec(x) + xsin(x) - (sec(x) - cos(x)) + ln(cos(x))cos(x)
= C + Csin(x) + Ccos(x) + xsin(x) + cos(x) + ln(cos(x))cos(x)
set C = C + 1
= C + Csin(x) + Ccos(x) + xsin(x) + ln(cos(x))cos(x)

