using Method of variation of parameter
y''+y = tan^2 t
To solve the equation y'' + y = tan^2(t) using the method of variation of parameters, we first need to find the complementary solution for the homogeneous equation y'' + y = 0.
The complementary solution is found by assuming y = e^(rt), where r is a constant to be determined. Substituting this into the equation, we get:
r^2e^(rt) + e^(rt) = 0
Factoring out e^(rt), we obtain:
e^(rt)(r^2 + 1) = 0
Since e^(rt) is never zero, we have:
r^2 + 1 = 0
Solving this equation, we find the roots:
r = ±i
Therefore, the complementary solution for the homogeneous equation is:
y_c(t) = c1cos(t) + c2sin(t)
Next, we need to find the particular solution for the non-homogeneous equation. We assume the particular solution has the form y_p(t) = u1(t)cos(t) + u2(t)sin(t), where u1(t) and u2(t) are functions to be determined.
We differentiate y_p(t) twice with respect to t and substitute it into the differential equation:
y''_p(t) + y_p(t) = tan^2(t)
(u1''(t)cos(t) + u2''(t)sin(t) + 2u1'(t)sin(t) - 2u2'(t)cos(t))(cos(t)) +
(u1''(t)cos(t) + u2''(t)sin(t) - 2u1'(t)sin(t) - 2u2'(t)cos(t))(sin(t)) = tan^2(t)
Simplifying and collecting terms, we get:
u1''(t)cos(t) + u2''(t)sin(t) = tan^2(t)
To solve this equation, we can use a standard method for solving a non-homogeneous equation with a specific form on the right-hand side. In this case, we can use the method of undetermined coefficients. We assume the function u1(t) and u2(t) have the same form as the right-hand side of the equation, which is tan^2(t).
u1(t) = A*tan^2(t)
u2(t) = B*tan^2(t)
where A and B are undetermined coefficients.
Now we substitute these assumed forms back into the equation:
(A*tan^2(t))''cos(t) + (B*tan^2(t))''sin(t) = tan^2(t)
Simplifying and collecting terms, we obtain:
(2Acos(t) - 2Bsin(t))tan^2(t) = tan^2(t)
This equation holds true for any value of t if the coefficients of tan^2(t) on both sides are equal. Therefore, we have:
2Acos(t) - 2Bsin(t) = 1
Comparing the coefficients of the trigonometric functions on both sides, we get the following two equations:
2Acos(t) = 1
-2Bsin(t) = 0
From the second equation, we find B = 0, since sin(t) is never zero.
Substituting B = 0 into the first equation, we solve for A:
2Acos(t) = 1
Acos(t) = 1/2
A = 1/2cos(t)
So, the particular solution is:
y_p(t) = (1/2cos(t))tan^2(t)
Finally, the general solution of the non-homogeneous equation is given by the sum of the complementary and particular solutions:
y(t) = y_c(t) + y_p(t)
y(t) = c1cos(t) + c2sin(t) + (1/2cos(t))tan^2(t)
This is the solution to the equation y'' + y = tan^2(t) using the method of variation of parameters.