Finding particular integrals

  • Thread starter OllyRutts
  • Start date
  • #1
4
0

Homework Statement


(d^2y/dx^2) + (dy/dx) = cos x


So 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 Im 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


and same for equating for cos x?

Thanks
Olly
 

Answers and Replies

  • #2
34,667
6,379

Homework Statement


(d^2y/dx^2) + (dy/dx) = cos x


So 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 Im 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
 
  • #3
Charles Link
Homework Helper
Insights Author
Gold Member
2020 Award
4,860
2,187

Homework Statement


(d^2y/dx^2) + (dy/dx) = cos x


So 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.
 

Related Threads on Finding particular integrals

  • Last Post
Replies
23
Views
3K
  • Last Post
Replies
1
Views
1K
Replies
3
Views
5K
Replies
3
Views
1K
Replies
13
Views
2K
  • Last Post
Replies
5
Views
2K
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
2
Views
11K
  • Last Post
Replies
2
Views
1K
  • Last Post
Replies
2
Views
1K
Top