Second Order Nonhomogeneous Linear Differential Equations

In summary, the conversation is discussing the method of variation of parameters to solve second order nonhomogeneous linear differential equations. The process involves finding the general solution of the homogeneous equation, as well as a particular solution of the nonhomogeneous equation. This is achieved by assuming a solution of the form ysubp(x) = usub1(x)sinx + usub2(x)cosx and solving for u1 and u2 using a system of first order differential equations. Finally, the general solution is found by adding the particular solution to the complementary solution.
  • #1
wubie
Hello,

I am having trouble understanding how to solve second order nonhomogeneous linear differential equations. I know how to solve second order homogeneous linear differential equations. But I am not following in the lecture and in the text the method of variation of parameters to solve second order nonhomogeneous linear differential equations.

For one's information I am using the text Calculus, 4th edition by James Stewart and the chapter is 18 and the section is 2. The page is 1170 for anyone familiar with this text.

Any help with this method would be appreciated. Thankyou.
 
Mathematics news on Phys.org
  • #2
Give us some doubts/pro u are facing we will explain u via the Ex
 
  • #3
Right. Here is an example from the text:

Solve the equation

y'' + y = tan x, 0 < x < pi/2

Now I know how to find the auxiliary equation

r^2 + 1 = 0

with roots

+i and - i.

So the solution of

y'' + y = 0 is

c1 sin x + c2 cos x.

This is my general solution for the homogeneous equation. I know that finding the general solution of a nonhomogeneous linear differential equation of second order contains a particular solution ysubp of the nonhomogeneous equation and the general solution of the homogeneous equation (the complementry equation ysubc).

So the next step is to find the particular solution of the nonhomogeneous linear differential equation of second order.
Using variation of parameters, I seek a solution of the form

ysubp(x) = usub1(x)sinx + usub2(x)cosx.

I then take the derivative of ysubp to get

y'subp = (u'sub1 sinx + u'sub2 cosx) + (usub1 cosx - usub2 sin x)

I then set

(u'sub1 sinx + u'sub2 cosx)= 0 ( I am not entirely clear why I do that)

then take the derivative of y'subp (second derivative). And get

y''subp = u'sub1'cosx - u'sub2 sinx - usub1 sinx - usub2 cosx

For ysubp to be a solution we must have

y''subp + ysubp = u'sub1 cosx - u'sub2 sinx = tan x.

This is achieved by subbing into the equation to be solve ysubp and y''subp.

From here I am not sure what to do. The text says to solve the previous equations

(u'sub1 sinx + u'sub2 cosx)= 0

and

y''subp + ysubp = u'sub1 cosx - u'sub2 sinx = tan x.

But I am not sure how to do that and I am not sure why I am doing that. I am having trouble following the text because it skips a few "elementry steps" (which would of course make things clearer for me). And the theory before it is brief and not entirely clear.

Would this be sufficient for now? I can elaborate some more. Detailed explanations would be appreciated. No elementry steps should be assumed or skipped. Sometimes it is the elementry steps that cause me trouble.

As said before this is in the above text if anyone has it available to them.

Any help is appreciated. Thankyou.
 
  • #4
it's been ten years since I've done this but i'll give it a shot.

(u'sub1 sinx + u'sub2 cosx)= 0

and

y''subp + ysubp = u'sub1 cosx - u'sub2 sinx = tan x.

first of all, i think you are free to set (u'sub1 sinx + u'sub2 cosx) equal to anything, as it is an asumption, i think, and a useful assumption that leads to solutions. not sure about the deeper reasons behind this assumption yet; it probably has to do with linear algebra and "linear independence" so you can't know much more than "it works" yet. but it gives you two equations and two unknowns: u1 and u2. it's a system of first order differential equations, a reduction from a second order. though now there are two equations.

let's look at it this way, and I'm going to assume you did all the derivatives right because i didn't check those:
u1' sinx + u2' cosx=0
u1' cosx - u2' sinx=tanx.

same idea in a system of linear equations: pick an equation and solve for a variable and then substitute it back. our approach will be the same except that we'll solve for u1' and u2' first and then integrate. then the final step is to say that y=u1sinx+u2cosx is a particular solution.

the first equation let's you solve for u1' in terms of u2':
u1' sinx=-u2'cosx, then divide by sinx to get
u1'=-u2' cotx. (cot=cos/sin)

now sub into the equation u1' cosx - u2' sinx=tanx to get:
(-u2' cotx) cosx - u2' sinx=tanx
-u2' cotx cosx - u2' sinx=tanx. now what do we have to do?

solve for u2'.

let's get rid of - and factor out u2':
u2' (cotx cosx + sinx)=-tanx
so u2'=-tanx/(cotx cosx + sinx).

you may have the feeling that we should simplify it.

one thing that often works for trig is changing everything to sine and cosine:
u2'=-(sinx/cosx)/((cosx/sinx) cosx + sinx)

there are a number of ways you can handle this but what smells best to me is to multiply by sinx/sinx:
u2'=-(sin2x/cosx)/((cosx) cosx + sin2x).

now (cosx) cosx + sin2x=1 by trig identity so we have:
u2'=-(sin2x/cosx).

remember that u1'= -u2' cotx, so
u1'=-(-(sin2x/cosx)) cotx. since cot=cos/sin, we get
u1'=sinx.

at this point, we must solve for u1 and u2 by integrating. u1=-cosx but u2 is harder. I'm going to let you look that one up (you may want to convert to -sinx tanx). assuming you get an integral for u2, let's just call it u2 and use u1=-cosx.

yp=-cosx sinx+u2 cosx is a particular solution. then the general solution is y=yp+c1 sinx +c2 cosx.

i'm suspecting since that integral is not nice that a calculation is wrong somewhere in what you did but if it's all correct, this is the solution i get with mathematica's dsolve command which took about 0.01 seconds.

let F(y)=y''+y. the ultimate goal is to find a y such that F(y)=tanx. but let's look at our solution which has the form yp + c1 sinx + c2 cosx. F distributes over addition, so
F(yp + c1 sinx + c2 cosx)=F(yp)+F(c1 sinx + c2 cosx)=tanx+0. this can be generalized to whenever the F distributes over addition: find a particular solution and add that to the homogeneous solution "space." that looks like a coset to me which means there's some kind of modular spaces involved unless I'm off my rocker.
 
Last edited:
  • #5
I then set

(u'sub1 sinx + u'sub2 cosx)= 0 ( I am not entirely clear why I do that)

Remember that there are an infinite number of solutions to the entire equation and you are seeking only one of them. You are free to put restrictions on your "search" as you please. That's why you can do it. You want to do it because it removes all first derivatives from the equation so when you differentiate again, to get the second derivative, your formula has only first derivatives in it.

Because you cleverly chose to use solutions to the homogeneous equation as coefficients when you substitute into the original equation, all terms that do not involve the derivative of u1 or u2, will give 0 (think about that: not differentiating them, they might as well be constants and constants times solutions to the homogeneous equation will give 0).

The point is that you now have two equations:
u'1 sinx + u'2 cosx= 0 and
u'1 cosx - u'2 sinx = tan x to solve for u'1 and u'2.
But I am not sure how to do that and I am not sure why I am doing that.
The why should be obvious! Because if you know them you will be able to substitute into your formula for the solution to the equation! The how is also (relatively) easy. Although these are dervatives, since the equation involve only first derivatives you can treat them as two (linear) algebraic equations. Solve them exactly the way you would any pair of linear equations.
For example, multiply the first equation by sin(x) and the second equation by cos(x) and add and the u'2 terms cancel out leaving u'1= sin(x). Now integrate: u1(x)= -cos(x). That was easy!
If you multiply the first equation by cos(x) and the second by sin(x) and subtract, the u'1 terms cancel out leaving u'2= -tan(x)sin(x)= -sin2(x)/cos(x).

That's a little harder to integrate but still possible. Once you have found u1 and u2 (since your are seeking only a single solution, you can ignore the constants of integration), put them back into y(x)= u1sin(x)+u2cos(x) to get the specific solution you need to add to the solution to the homogeneous equation.
 
  • #6
Many thanks go out to pheonixtoth and HallsofIvy for their replies.

Thanks to pheonixtoth for showing the step by step procedure. I tried to get fancy and solve the system of two equations by using matrix calculations and got into trouble. I then tried to solve it the conventional way but I was making tiny mistakes still which prevented me from solving for usub1 and usub2. As a result I couldn't follow the example in the text since I wasn't performing the correct steps. pheonix's step by step procedure allowed me to see where I was making my mistake.

Thanks again pheonix.

Thanks go out to HallsofIvy for explaining the "whys" of each step. I followed once again the example in the text while carefully reading HallsofIvy's explanations and was able to follow the text more closely this time. Some of the explanations cleared up some questions that I had but could not articulate while other explanations allowed me to catch some explanations in the text that I kept on missing. HallsofIvy's explanations coupled with pheonix's calculations enabled me to see why and how things were being done in the text.

Thanks again HallsofIvy.

Sometimes it takes me time to get back to my post. This is because I have other homework to do and other class to attend. But I always appreciate the efforts of others here in the physics forums to take the time and explain things to me, however simple they might be.

Cheers pheonix and HallsofIvy. You both saved me a lot of frustration.
 

1. What is a second order nonhomogeneous linear differential equation?

A second order nonhomogeneous linear differential equation is a mathematical equation that involves the second derivative of a function, as well as the function itself and its first derivative. It is called "nonhomogeneous" because it includes a term that is not equal to zero, and "linear" because the function and its derivatives have a degree of 1.

2. How is a second order nonhomogeneous linear differential equation solved?

To solve a second order nonhomogeneous linear differential equation, you must first find the general solution by solving the associated homogeneous equation. Then, you can use the method of variation of parameters to find a particular solution that satisfies the nonhomogeneous term.

3. What is the difference between a homogeneous and nonhomogeneous differential equation?

A homogeneous differential equation is one where the nonhomogeneous term is equal to zero, while a nonhomogeneous differential equation has a non-zero term. This difference is important because it affects the method used to solve the equation.

4. What are some real-world applications of second order nonhomogeneous linear differential equations?

Second order nonhomogeneous linear differential equations are commonly used in physics and engineering to model systems that involve acceleration, such as motion of a mass on a spring or a pendulum. They can also be used to describe the behavior of electrical circuits and control systems.

5. Are there any limitations to using second order nonhomogeneous linear differential equations?

One limitation of using second order nonhomogeneous linear differential equations is that they can only model systems that can be represented by a linear equation. Additionally, they may not accurately represent systems with nonlinear behavior or those that are subject to external forces that are difficult to model mathematically.

Similar threads

  • Science and Math Textbooks
Replies
1
Views
945
  • Classical Physics
Replies
12
Views
711
Replies
9
Views
2K
  • Introductory Physics Homework Help
Replies
8
Views
990
Replies
5
Views
761
Replies
8
Views
1K
Replies
12
Views
216
Replies
2
Views
2K
  • Differential Equations
Replies
2
Views
2K
Back
Top