How Do You Solve a Second Order ODE with Specific Boundary Conditions?

In summary, a second order ODE is a mathematical equation that involves a function and its derivatives up to the second order. To solve a second order ODE, one must find both a particular solution and a complementary solution. Applications of second order ODEs include modeling physical phenomena and use in various fields of science and engineering. The initial conditions for solving a second order ODE involve specifying the values of the function and its first derivative at a given point. Special techniques for solving second order ODEs include the method of undetermined coefficients, variation of parameters, and the Laplace transform method. The appropriate method should be determined based on the form of the ODE and the given initial conditions.
  • #1
DunWorry
40
0

Homework Statement


basically solve [itex]\frac{d^{2}y}{dx^{2}}[/itex] + 4[itex]\frac{dy}{dx}[/itex] + 4y = cos2x

Boundary conditions are y=0, dy/dx =1 at x=0


Homework Equations





The Attempt at a Solution


I am having trouble getting the coefficients to the solution. I got the complementary function as y[itex]_{cf}[/itex] = (A[itex]_{1}[/itex]x+A[itex]_{2}[/itex])e[itex]^{-2x}[/itex]

and the paticular integral is y[itex]_{PI}[/itex] = Bcos2x
So first I find coefficient B I [itex]\frac{dy}{dx}[/itex] = -2Bsin2x
and [itex]\frac{d^{2}y}{dx^{2}}[/itex] = -4Bcos2x

Now I sub back into equation and compare coefficients I get -4Bcos2x -8Bsin2x + 4Bcos2x = cos2x
This simplifies to -8Bsin2x = cos2x. I am not sure how I am supposed to compare coefficients here, in the answers it looks like the particular integral is [itex]\frac{1}{8}[/itex] sin2x. If I rearrange -8Bsin2x = cos2x I get B = - [itex]\frac{1}{8}[/itex]cotx

So not only have I got the trig function wrong but I got the sign wrong too, have I done something wrong elsewhere?

Thanks
 
Physics news on Phys.org
  • #2
You need
yp=Bsin(2x)
in general you would need
yp=Acos(2x)+Bsin(2x)
but in this problem A=0
 
  • #3
DunWorry said:

Homework Statement


basically solve [itex]\frac{d^{2}y}{dx^{2}}[/itex] + 4[itex]\frac{dy}{dx}[/itex] + 4y = cos2x

Boundary conditions are y=0, dy/dx =1 at x=0

Homework Equations


The Attempt at a Solution


I am having trouble getting the coefficients to the solution. I got the complementary function as y[itex]_{cf}[/itex] = (A[itex]_{1}[/itex]x+A[itex]_{2}[/itex])e[itex]^{-2x}[/itex]

and the paticular integral is y[itex]_{PI}[/itex] = Bcos2x
No, it isn't. In general, for a sine or cosine you will need both sine and cosine. As lurflurf says, for this particular problem it turns out you only need sin(2x) but it is difficult to see that before actually doing the calculations. Instead try both.

So first I find coefficient B I [itex]\frac{dy}{dx}[/itex] = -2Bsin2x
and [itex]\frac{d^{2}y}{dx^{2}}[/itex] = -4Bcos2x

Now I sub back into equation and compare coefficients I get -4Bcos2x -8Bsin2x + 4Bcos2x = cos2x
This simplifies to -8Bsin2x = cos2x. I am not sure how I am supposed to compare coefficients here, in the answers it looks like the particular integral is [itex]\frac{1}{8}[/itex] sin2x. If I rearrange -8Bsin2x = cos2x I get B = - [itex]\frac{1}{8}[/itex]cotx
The fact that you wound up with both sine and cosine should have made you go back and try "Acos(2x)+ Bsin(2x)" even if you hadn't seen it before.

So not only have I got the trig function wrong but I got the sign wrong too, have I done something wrong elsewhere?

Thanks
The "sign" is not the problem. The real problem is that cot(x) is not a constant! Didn't you notice that?
 
  • #4
Right yes thanks I have solved it now and got the right answer, can I just confirm a few things?

So say I got the paticular integral to be [itex]\frac{1}{8}[/itex]Sin 2x.

So my general solution to this is y = (A[itex]_{1}[/itex]x + A[itex]_{2}[/itex])e[itex]^{-2x}[/itex] + [itex]\frac{1}{8}[/itex]Sin 2x

I apply the boundary conditions to be general solution right? and not to the original equation?

Boundary conditions are y=0, dy/dx =1 at x=0

So I get A[itex]_{2}[/itex] = 0

Then I differentiate my general solution to apply the second boundary condition, that dy/dx =1

and I got the required coefficients, is this the best/correct method?

Thanks
 
  • #5
DunWorry said:
Right yes thanks I have solved it now and got the right answer, can I just confirm a few things?

So say I got the paticular integral to be [itex]\frac{1}{8}[/itex]Sin 2x.

So my general solution to this is y = (A[itex]_{1}[/itex]x + A[itex]_{2}[/itex])e[itex]^{-2x}[/itex] + [itex]\frac{1}{8}[/itex]Sin 2x

I apply the boundary conditions to be general solution right? and not to the original equation?
Yes, that is correct. The boundary conditions are to be satisfied by the solution to the entire equation, not just the solution to the associated homogeneous equatioin (which is, I think, what you meant by "the original equation").

Boundary conditions are y=0, dy/dx =1 at x=0

So I get A[itex]_{2}[/itex] = 0
Yes, [itex]y(0)= (A_1(0)+ A_2)e^0+ sin(0)= A_2= 0[/itex]


Then I differentiate my general solution to apply the second boundary condition, that dy/dx =1

and I got the required coefficients, is this the best/correct method?

Thanks
Yes. With [itex]A_2= 0[/itex], your general solution is [itex]y(x)= A_1xe^{-2x}+ (1/8)sin(2x)[/itex] and its derivative is [itex]y'(x)= A_1e^{-2x}- 2A_1xe^{-2x}+ (1/4)cos(2x)[/itex]. Evaluate that at x= 0, set it equal to 1 and solve for [itex]A_1[/itex].
 

1. What is a second order ODE?

A second order ordinary differential equation (ODE) is a mathematical equation that involves a function and its derivatives up to the second order. It can be written in the form y'' + p(x)y' + q(x)y = f(x), where y' and y'' represent the first and second derivatives of y with respect to x, and p(x), q(x), and f(x) are known functions.

2. How do I solve a second order ODE?

The general method for solving a second order ODE involves finding a particular solution and a complementary solution. The particular solution can be found by using a known form of the solution, such as a power series or a substitution. The complementary solution can be found by solving the associated homogeneous equation, which is the equation with f(x) set to 0. The final solution is the sum of the particular and complementary solutions.

3. What are the applications of second order ODEs?

Second order ODEs have many applications in science and engineering. They can be used to model physical phenomena such as motion, heat transfer, and population growth. They are also commonly used in control systems, circuit analysis, and signal processing.

4. What are the initial conditions for solving a second order ODE?

The initial conditions for solving a second order ODE typically involve specifying the values of the function and its first derivative at a given point. These initial conditions are needed to find the particular solution and fully determine the solution to the ODE.

5. Are there any special techniques for solving second order ODEs?

Yes, there are several special techniques for solving certain types of second order ODEs. These include the method of undetermined coefficients, the method of variation of parameters, and the Laplace transform method. It is important to determine the most appropriate method based on the form of the ODE and the given initial conditions.

Similar threads

Replies
4
Views
502
  • Calculus and Beyond Homework Help
Replies
11
Views
1K
  • Calculus and Beyond Homework Help
Replies
19
Views
777
  • Calculus and Beyond Homework Help
Replies
21
Views
842
  • Calculus and Beyond Homework Help
Replies
33
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
14
Views
2K
  • Calculus and Beyond Homework Help
Replies
8
Views
763
  • Calculus and Beyond Homework Help
Replies
12
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
Back
Top