How Do You Solve a Second Order Differential Equation Using Trial Solutions?

  • Thread starter Thread starter OllyRutts
  • Start date Start date
  • Tags Tags
    Integrals
Click For Summary
The discussion focuses on solving the second-order differential equation (d^2y/dx^2) + (dy/dx) = cos x using trial solutions. The proposed trial solution is y = p*cos(x) + q*sin(x), leading to the derivatives dy/dx and d^2y/dx^2. The main issue arises when equating coefficients after substituting these derivatives into the original equation, specifically why -q*sin(x) - p*sin(x) equals cos(x) and how to properly equate coefficients. It is clarified that for the equation to hold for all x, the coefficients of sin(x) must equal zero and the coefficient of cos(x) must equal one, due to the linear independence of sine and cosine functions. Additionally, the discussion emphasizes the importance of including solutions to the homogeneous equation for a complete solution.
OllyRutts
Messages
4
Reaction score
0

Homework Statement


(d^2y/dx^2) + (dy/dx) = cos xSo you have the trial solution
y= p*cos(x)+q*sin(x)
(dy/dx) = -p*sin(x)+q*cos(x)
(d^2y/dx^2)=-p*cos(x)-q*sin(x)

The issue I am having is equating the coefficients when after I have subbed them into the initial equation:
-p*cos(x)-q*sin(x)-p*sin(x)+q*cos(x)=cos(x)

Equating coefficients of sin x gives -q-p=0
Equating coefficients ofcos x gives -p+q=1
My question is why is
-q*sin(x)-p*sin(x)=cos(x)
= q-p=0and same for equating for cos x?

Thanks
Olly
 
Physics news on Phys.org
OllyRutts said:

Homework Statement


(d^2y/dx^2) + (dy/dx) = cos xSo you have the trial solution
y= p*cos(x)+q*sin(x)
(dy/dx) = -p*sin(x)+q*cos(x)
(d^2y/dx^2)=-p*cos(x)-q*sin(x)
It's much simpler to write the 2nd and 3rd equations as
y' = -p * sin(x) + q * cos(x)
y'' = -p * cos(x) - q * sin(x)
OllyRutts said:
The issue I am having is equating the coefficients when after I have subbed them into the initial equation:
-p*cos(x)-q*sin(x)-p*sin(x)+q*cos(x)=cos(x)
Equating coefficients of sin x gives -q-p=0
Equating coefficients ofcos x gives -p+q=1
My question is why is
-q*sin(x)-p*sin(x)=cos(x)
= q-p=0
Because the equation ##(-p + q)\cos(x) + (-q - p)\sin(x) = \cos(x)## has to be identically true; i.e., true independent of the values of x.
So for the equation to be true for all values of x, it must be the case that the coefficient of cos(x) on the left side has to be 1, and the coefficient of sin(x) on the left side has to be 0, since sin(x) doesn't appear on the right side.
It's also true (and germane to my reasoning here) that the sin and cos functions are linearly independent. That is, neither one is a constant multiple of the other.
OllyRutts said:
and same for equating for cos x?

Thanks
Olly
 
OllyRutts said:

Homework Statement


(d^2y/dx^2) + (dy/dx) = cos xSo you have the trial solution
y= p*cos(x)+q*sin(x)
.
Don't forget the possibility of solutions to the homogeneous equation, where instead of ## \cos x ##, the right side of the differential equation is equal to zero. The complete solution consists of the particular solution, (which you found), plus any homogeneous solution.
 
Question: A clock's minute hand has length 4 and its hour hand has length 3. What is the distance between the tips at the moment when it is increasing most rapidly?(Putnam Exam Question) Answer: Making assumption that both the hands moves at constant angular velocities, the answer is ## \sqrt{7} .## But don't you think this assumption is somewhat doubtful and wrong?

Similar threads

Replies
3
Views
2K
Replies
3
Views
2K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K