Variation of Parameters

alane1994

Active member
I was given the problem,

"Find the general solution of the given differential equation."
$$y^{\prime\prime}+9y=9\sec^2(3t)$$

My work as follows, please let me know if this is correct and where to go from here. I have hit a roadblock of sorts.

$$y^{\prime\prime}+9y=9\sec^2(3t)$$

$$y^{\prime\prime}+9y=0\\ m^2+9=0\\ m=3\\ y=\cos(3t)+\sin(3t)$$

So,
$$y=c_1\cos(3t)+c_2\sin(3t)$$

Where,
$$y_1=\cos(3t)\\ y_2=\sin(3t)$$

$$Y(t)=-y_1\int \dfrac{y_2g(t)}{W(y_1,y_2)}dt+y_2\int \dfrac{y_1g(t)}{W(y_1,y_2)}$$

$$y_1=\cos(3t)~~~y_1^{\prime}=-3\sin(3t)$$
$$y_2=\sin(3t)~~~y_2^{\prime}=3\cos(3t)$$

$$W=y_1y_2^{\prime}-y_1^{\prime}y_2$$

Look ok so far? Any thoughts as to how I should proceed?

Last edited:

MarkFL

Staff member
I want to demonstrate the method I was taught, which avoids the use of Wronskians. Normally I would not provide a full solution, but in this case, I thought it might be instructive to do so since I am using an alternate method.

If I were to solve this problem using variation of parameters, I would proceed as follows:

We are given:

$$\displaystyle y''+9y=9\sec^2(3t)$$

(a) Find a fundamental solution set $$\displaystyle \{y_1(t),y_2(t)\}$$ for the corresponding homogeneous equation:

$$\displaystyle y''+9y=0$$

The characteristic roots are:

$$\displaystyle r=\pm3i$$

Hence:

$$\displaystyle \{y_1(t),y_2(t)\}=\{\cos(3t),\sin(3t)\}$$

(b) Take as the particular solution:

$$\displaystyle y_p(t)=v_1(t)\cos(3t)+v_2(t)\sin(3t)$$

(c) Determine $v_1(t)$ and $v_2(t)$ by solving the system:

$$\displaystyle \cos(3t)v_1'+\sin(3t)v_2'=0$$

$$\displaystyle -\sin(3t)v_1'+\cos(3t)v_2'=3\sec^2(3t)$$

We find from the first equation:

$$\displaystyle v_1'=-\tan(3t)v_2'$$

And so by substitution into the second equation, we obtain:

$$\displaystyle -\sin(3t)\left(-\tan(3t)v_2' \right)+\cos(3t)v_2'=3\sec^2(3t)$$

$$\displaystyle v_2'=3\sec(3t)$$

and so:

$$\displaystyle v_1'=-3\sec(3t)\tan(3t)$$

Integrating, we find:

$$\displaystyle v_1(t)=-\sec(3t)$$

$$\displaystyle v_2(t)=\ln\left|\sec(3t)+\tan(3t) \right|$$

And so the particular solution is:

$$\displaystyle y_p(t)=\sin(3t)\ln\left|\sec(3t)+\tan(3t) \right|-1$$

Thus, by the principle of superposition, we find the general solution to the ODE is:

$$\displaystyle y(t)=y_h(t)+y_p(t)=c_1\cos(3t)+c_2\sin(3t)+\sin(3t)\ln\left|\sec(3t)+\tan(3t) \right|-1$$

alane1994

Active member
Wow, thank you so much! Your way does seem a little (read: a lot) easier than the way I was trying to go.
Makes more sense to me as well!