MHB Solve Linear Inhomogeneous 2nd Order ODE - Alvin's Question on Yahoo Answers

Click For Summary
The discussion focuses on solving the nonhomogeneous second-order ordinary differential equation (ODE) given by y'' + y = csc(x) using the method of variation of parameters. The fundamental solutions for the corresponding homogeneous equation are identified as y1(x) = cos(x) and y2(x) = sin(x). A particular solution is constructed as y_p(x) = v1(x)cos(x) + v2(x)sin(x), leading to a system of equations that ultimately yields v1 = -x and v2 = ln|sin(x)|. The general solution is then expressed as y(x) = A cos(x) + B sin(x) - x cos(x) + sin(x) ln|sin(x)|. This solution effectively combines the homogeneous and particular solutions to address the original ODE.
MarkFL
Gold Member
MHB
Messages
13,284
Reaction score
12
Here is the question:

Solve the given nonhomogeneous ODE by variation of parameters or undetermined coefficients. Give a general sol?

Solve the given nonhomogeneous ODE by variation of parameters or undetermined coefficients. Give a general solution.
Please show work so I can learn. Thanks!

View attachment 2235

I have posted a link there to this thread so the OP can view my work.
 

Attachments

  • alvin.png
    alvin.png
    8.9 KB · Views: 108
Mathematics news on Phys.org
Hello Alvin,

We are given to solve:

$$y''+y=\csc(x)$$

I will use variation of parameters because I don't see how the annihilate the right side of the equation.

We see that a fundamental solution set for the corresponding homogeneous equation are:

$$y_1(x)=\cos(x)$$

$$y_2(x)=\sin(x)$$

And so we take as our particular solution:

$$y_p(x)=v_1(x)\cos(x)+v_2(x)\sin(x)$$

Next, we want to solve the system:

$$\cos(x)v_1'+\sin(x)v_2'=0$$

$$-\sin(x)v_1'+\cos(x)v_2'=\csc(x)$$

From the first equation, we find:

$$v_1'=-\tan(x)v_2'$$

And so substituting into the second equation, we obtain:

$$\frac{\sin^2(x)}{\cos(x)}v_2'+\cos(x)v_2'=\csc(x)$$

Multiply through by $\cos(x)$:

$$\sin^2(x)v_2'+\cos^2(x)v_2'=\cot(x)$$

Apply a Pythagorean identity on the left:

$$v_2'=\cot(x)$$

Hence, this implies:

$$v_1'=-1$$

Integrating, we obtain:

$$v_1=-x$$

$$v_2=\ln|\sin(x)|$$

And so out particular solution is:

$$y_p(x)=-x\cos(x)+\sin(x)\ln|\sin(x)|$$

And then by superposition, we obtain the general solution:

$$y(x)=y_h(x)+y_p(x)=A\cos(x)+B\sin(x)-x\cos(x)+\sin(x)\ln|\sin(x)|$$