Second order ODE with RHS = product of two functions

In summary: Neither of these yielded a solutions for any of the constants.I think the combinations tried have been too restrictive.
  • #1
CAF123
Gold Member
2,948
88

Homework Statement


Find the general solution of the ODE $$ y'' + 16y = 64x \cos x.$$ If ## y(0)=1, y'(0) = 0##, what is the particular solution?

The Attempt at a Solution



I am confident I can tackle this question, I really just want to check that my particular integral form is correct. I originally said ##y_p(x) = x(C_1 \cos 4x + C_2 \sin 4x)(ax + b)##, where ##C_1, C_2, a,b ## are constants. However, when I do the first derivative and then the second derivative and then sub this into the ODE, I get two eqns with 4 unknowns. (The 4 unknowns being the constants). So then I tried combining the form so that there was only two constants. So I have either ##x[(C_1 \cos 4x + C_2 \sin 4x)(C_1 x + C_2)]## or ## x[(C_1 x +C_2)\cos 4x + (C_1x +C_2)\sin 4x]## Should I go with the second option?
Thanks
 
Physics news on Phys.org
  • #2
CAF123 said:
I really just want to check that my particular integral form is correct. I originally said ##y_p(x) = x(C_1 \cos 4x + C_2 \sin 4x)(ax + b)##
Surely for the PI you will need functions like x cos(x), x sin(x).
 
  • #3
Sorry, I mistyped the problem. It should be RHS = ##64x \cos 4x##
 
  • #4
Remember the general solution is made up of your homogeneous solution plus a particular solution, [itex]y= y_c(x) + y_p(x)[/itex].

So start by solving [itex]L[y] = 0[/itex] for your homogeneous solution [itex]y_c(x)[/itex]. I believe your roots will be ±4i.

Now you want to solve the non-homogeneous equation [itex]L[y] = 64xcosx[/itex] for the particular solution [itex]y_p(x)[/itex]. You have two ways to go about this, the method or undetermined coefficients or the method of variation of parameters.

In this case since your polynomial is of relatively low degree, I would choose undetermined coefficients. So your guess at a particular solution should have the form :

[itex]y_p(x) = (Ax+b)(Csin4x + Dcos4x)[/itex]

I leave the rest to you now.
 
Last edited:
  • #5
I corrected my initial post. The RHS should read 64x cos4x. I took the particular integral to be x(a cos4x + bsin4x)(cx +d). In the end, I get two eqns , with the 4 unknowns. So what I then tried to do was to give a form incorporating only two constants,(see my first post), but when I tried that I got my apparent constants being functions of x.

I think the way with 4 constants is correct, but I don't see how you can get solutions for the constants. Many thanks.
 
  • #6
CAF123 said:
I corrected my initial post. The RHS should read 64x cos4x. I took the particular integral to be x(a cos4x + bsin4x)(cx +d). In the end, I get two eqns , with the 4 unknowns. So what I then tried to do was to give a form incorporating only two constants,(see my first post), but when I tried that I got my apparent constants being functions of x.

I think the way with 4 constants is correct, but I don't see how you can get solutions for the constants. Many thanks.

I edited my last post to reflect your changes.

Now, what is yp' and yp''? After you find these, plug them back into L[y] = 64xcos4x and solve for your coefficients. What do you get?
 
  • #7
Zondrina said:
I edited my last post to reflect your changes.

Now, what is yp' and yp''? After you find these, plug them back into L[y] = 64xcos4x and solve for your coefficients. What do you get?

I think the particular integral you wrote should be multiplied by x since ±4i are roots of the auxiliary eqn. When I sub in for yp' and yp'' into the ODE, I keep getting each constant as a function of something else. I am going to try it again now. Thanks

EDIT:The eqns I get in the end are $$ -8A(2Cx+D) + 2CB = 0,\,\,\,2CA + 8B(2Cx +D) = 64x, $$ which is 4 unknowns in 2 eqns, so I can't get a solution for each of the constants.
 
Last edited:
  • #8
CAF123 said:
The eqns I get in the end are $$ -8A(2Cx+D) + 2CB = 0,\,\,\,2CA + 8B(2Cx +D) = 64x, $$ which is 4 unknowns in 2 eqns, so I can't get a solution for each of the constants.
No, there are four equations there. In order to be true for all x, the different powers of x must vanish independently. Trouble is, you then find there are no solutions.
 
  • #9
I think the combinations tried have been too restrictive.
Try (quadratic)*sin 4x + (quadratic)*cos 4x.
 
  • #10
Ok, so what I have tried is the following:
1)##y_p = (Cx^2 +Dx)\cos4x + (Cx^2+Dx)\sin4x##. When I differentiate twice, sub it into ODE, I get my (apparant) constants being functions of x.
2) ##y_p = (Cx^2 +Dx)A\cos4x + (Cx^2+Dx)B\sin4x##. This, to me, seems the most plausible form of solution, and after differentiating twice and subbing in, I tried both of the following, still yielding things that I could not solve :frown:
i)collected terms in cos4x and sin4x, The two eqns I got from that I showed in my last post(@haruspex: How is that 4 eqns?)
ii) Alternatively, I collected terms in xcos4x, cos4x, x2cos4x, sin4x, xsin4x and x2sin4x. I now get 6 eqns and only 4 unknowns, yet I can't solve the following set of non-linear eqns: (In fact, after some manipulation I feel they look inconsistent)
##-16AC = 0##.
##-16AD + 16CB = 64##,
##-16BC=0##,
##2CA+8BD=64x##,
##-8DA+2CB=0##,
##-16CA-16DB=0##.
I don't know what to try next. Everything I have tried seems reasonable - I just get to a stage where I can go no further. Any advice?
 
  • #11
CAF123 said:
Ok, so what I have tried is the following:
1)##y_p = (Cx^2 +Dx)\cos4x + (Cx^2+Dx)\sin4x##.
No, you cannot assume cos 4x and sin 4x have the same coefficients. Use [itex](Cx^2+ Dx)cos(4x)+ (Ex^2+ Fx) sin(4x)[/itex] and solve for all four of C, D, E, and F.

When I differentiate twice, sub it into ODE, I get my (apparant) constants being functions of x.
2) ##y_p = (Cx^2 +Dx)A\cos4x + (Cx^2+Dx)B\sin4x##. This, to me, seems the most plausible form of solution, and after differentiating twice and subbing in, I tried both of the following, still yielding things that I could not solve :frown:
i)collected terms in cos4x and sin4x, The two eqns I got from that I showed in my last post(@haruspex: How is that 4 eqns?)
ii) Alternatively, I collected terms in xcos4x, cos4x, x2cos4x, sin4x, xsin4x and x2sin4x. I now get 6 eqns and only 4 unknowns, yet I can't solve the following set of non-linear eqns: (In fact, after some manipulation I feel they look inconsistent)
##-16AC = 0##.
##-16AD + 16CB = 64##,
##-16BC=0##,
##2CA+8BD=64x##,
##-8DA+2CB=0##,
##-16CA-16DB=0##.
I don't know what to try next. Everything I have tried seems reasonable - I just get to a stage where I can go no further. Any advice?
 
  • #12
Yes, as I said the other method seemed more plausible. I eventually get to the eqns ##DA=1, BD=8x, CB=4, CA=0##. I think these are inconsistent?
EDIT: Is ##y_p = (Cx^2 + Dx)A\cos4x + (Cx^2+Dx)B\sin4x## ok?
 
  • #13
CAF123 said:
Yes, as I said the other method seemed more plausible. I eventually get to the eqns ##DA=1, BD=8x, CB=4, CA=0##. I think these are inconsistent?
EDIT: Is ##y_p = (Cx^2 + Dx)A\cos4x + (Cx^2+Dx)B\sin4x## ok?
Still too restrictive. You are assuming the x2 and x coefficients are in the same ratio for the cos and the sin. Try the C, D, E, F form Halls suggested.
 
  • #14
haruspex said:
Still too restrictive. You are assuming the x2 and x coefficients are in the same ratio for the cos and the sin. Try the C, D, E, F form Halls suggested.
Thanks a lot. I now get solutions and eqns that were a lot easier to solve. Was the reason I couldn't solve my previous set of eqns due to the fact I had too much restriction on the particular integral?
EDIT: Wait.. Isn't mine and Halls proposed integral effectively the same? If you let, in my form, CA = E, DA = F, CB = G and DB = H, then this is essentially what Halls proposed?
 
Last edited:
  • #15
CAF123 said:
If you let, in my form, CA = E, DA = F, CB = G and DB = H, then this is essentially what Halls proposed?
No. With those relationships, E/F = C/D = G/H. In general, there's no reason why E/F = G/H.
Because you had four unknowns you assumed you had four degrees of freedom, but that is not necessarily the case. E.g. in your version A=B=2, C=D=1 is the same solution as A=B=1, C=D=2.
 

Related to Second order ODE with RHS = product of two functions

1. What is a second order ODE with RHS?

A second order ODE with RHS, or right-hand side, is a type of differential equation that involves a second derivative of a dependent variable, as well as a function that represents the rate of change of the dependent variable.

2. How is a second order ODE with RHS different from a regular second order ODE?

A regular second order ODE only involves the second derivative of the dependent variable, while a second order ODE with RHS also includes a function that represents an external influence or driving force on the dependent variable.

3. What does it mean for the RHS of a second order ODE to be a product of two functions?

This means that the external influence or driving force on the dependent variable is a result of two functions being multiplied together. In other words, the rate of change of the dependent variable is affected by the product of these two functions.

4. What are some examples of real-life situations that can be modeled by a second order ODE with RHS as a product of two functions?

Some examples include the motion of a pendulum with air resistance, the growth of a population with limited resources, and the oscillations of an electric circuit with an external voltage source.

5. How do you solve a second order ODE with RHS as a product of two functions?

To solve this type of ODE, you can use methods such as the method of undetermined coefficients or variation of parameters. It is also helpful to have a good understanding of solving regular second order ODEs before attempting to solve ones with a product of two functions as the RHS.

Similar threads

  • Calculus and Beyond Homework Help
Replies
8
Views
363
  • Calculus and Beyond Homework Help
Replies
2
Views
130
  • Calculus and Beyond Homework Help
Replies
3
Views
863
  • Calculus and Beyond Homework Help
Replies
14
Views
506
Replies
4
Views
588
  • Calculus and Beyond Homework Help
Replies
5
Views
357
  • Calculus and Beyond Homework Help
Replies
1
Views
406
Replies
12
Views
465
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
871
Back
Top