• Support PF! Buy your school textbooks, materials and every day products Here!

Second Order Differential Equations

  • #1

Homework Statement


Solve the ODE with the boundary conditions given

Q''+Q = Sin(2x) where Q(0) = 1 and Q'(0) = 2
So i know i need to solve the general and particular solutions, however, I am a little confused. Any help or advice would be great, Thanks in advance.

Homework Equations


Y = Yg +Yp


The Attempt at a Solution


Assume RHS = 0 for general solution
Q'' + Q = 0

Let Q = e^kx
Q' = k e^kx
Q'' = k^2 e^kx
therefore
k^2e^kx + e^kx = 0
e^kx(k^2) = 0
k=0???????
Yg = A e ^kx +Bx e^kx???

Particular Solution
Yp = A Sin 2x + B Cos 2x
Yp' = 2A Cos 2x - 2B Sin 2x
Yp"= -4A Sin 2x - 4B Cos (2x)


-4A Sin 2x - 4B Cos (2x) + A Sin 2x + B Cos 2x = Sin(2x)
-3A Sin 2x = Sin 2x
a = -1/3

Homework Statement





Homework Equations





The Attempt at a Solution

 

Answers and Replies

  • #2
36
0
You've got a mistake. You made the claim that
$$
k^2e^{kx}+e^{kx}=0\\
\Rightarrow k^2e^{kx}=0
$$
That's not true, is it? What's ##k## really?
 
  • #3
HallsofIvy
Science Advisor
Homework Helper
41,833
955

Homework Statement


Solve the ODE with the boundary conditions given

Q''+Q = Sin(2x) where Q(0) = 1 and Q'(0) = 2
So i know i need to solve the general and particular solutions, however, I am a little confused. Any help or advice would be great, Thanks in advance.

Homework Equations


Y = Yg +Yp


The Attempt at a Solution


Assume RHS = 0 for general solution
Q'' + Q = 0

Let Q = e^kx
Q' = k e^kx
Q'' = k^2 e^kx
therefore
k^2e^kx + e^kx = 0
e^kx(k^2) = 0
No, factoring out e^{kx} gives e^{kx}(k^2+ 1)= 0.

k=0???????
Yg = A e ^kx +Bx e^kx???

Particular Solution
Yp = A Sin 2x + B Cos 2x
Yp' = 2A Cos 2x - 2B Sin 2x
Yp"= -4A Sin 2x - 4B Cos (2x)


-4A Sin 2x - 4B Cos (2x) + A Sin 2x + B Cos 2x = Sin(2x)
-3A Sin 2x = Sin 2x
a = -1/3

Homework Statement





Homework Equations





The Attempt at a Solution

 
  • #5
e^kt(k^2+1) = 0
k = i ---> sqrt(-1)

So then the general assumption would be.

Yg = e^-kt(ASin2x + iBsin2x) ?
 
  • #6
Or just
Yg = A Sin2x + i BCos 2x
?
Sorry about lack of real looking equations I am on my iPhone
 
  • #7
36
0
$$
k=\pm i
$$
So the general form of the solution is
$$
Q_g(x)=c_1 e^{ix}+c_2 e^{-ix}
$$
Or equivalently,
$$
Q_g(x)=A\sin(x)+B\cos(x)
$$
Now take a guess at the particular solution. Let's guess that ##Q_p(x)=D\sin(2x)##. Plug this into the differential equation and solve for D. It will give you the particular solution.
 
  • #8
Excellent.
So from there:

Yp = C Sin(2x)
Yp' = 2C Cos(2x)
Yp" = -4C Sin(2x)

-4C Sin(2x) + C Sin(2x) = Sin(2x)
-3C = 1
C = -1/3

Yp = -1/3 Sin (2x)
So then the solution starts as

Y = Yg + Yp
Y = A Sin (x) + B Cos(x) -1/3 Sin(2x)

Sub in initial Conditions Q(0) = 1 or x=0
Y = A Sin (x) + B Cos(x) -1/3 Sin(2x)
1 = 0 + B - 0
B = 1

Sub in next conditions
Q'(0) = 2
Y = A Sin (x) + B Cos(x) -1/3 Sin(2x)
Y' = A Cos(x) - B Sin(x) - 2/3 Cos (2x)
Y'(0) = A - 2/3 = 2
A = 8/3

So the final solution for the equation would be

Y = 8/3 Sin(x) + Cos(x) - 1/3 Sin(2x) ?

:D
 
  • #9
36
0
Looks good to me.
 

Related Threads on Second Order Differential Equations

Replies
5
Views
859
  • Last Post
Replies
5
Views
1K
  • Last Post
Replies
2
Views
624
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
1
Views
737
  • Last Post
Replies
3
Views
880
  • Last Post
Replies
1
Views
7K
  • Last Post
Replies
1
Views
365
  • Last Post
Replies
1
Views
978
  • Last Post
Replies
5
Views
2K
Top