Solve IVP: Undetermined Coefficient Method

In summary: I have no idea how to solve A and B, it is using the initial condition to solve for A and B ??At this point, you should be able to solve for A and B using the initial conditions.
  • #1
Fallen6
7
3
Summary:: Initial value problem

Solve the given initial-value problem differential equation by undetermined coefficient method.

d^2 x/dt^2 + w^2 x = F sin wt , x(0) = 0, x'(0) = 0

I get the sol = C1 cos wt + C2 sin wt, but i always get 0 when I plug into the equation, anyone can help me please.

[Thread moved from the technical forums so no Homework Template is shown]
 
Last edited by a moderator:
  • Like
Likes Delta2
Physics news on Phys.org
  • #2
Fallen6 said:
Summary:: Initial value problem

Solve the given initial-value problem differential equation by undetermined coefficient method.

d^2 x/dt^2 + w^2 x = F sin wt , x(0) = 0, x'(0) = 0

I get the sol = C1 cos wt + C2 sin wt, but i always get 0 when I plug into the equation, anyone can help me pls.
Your solution, ##x(t) = C_1\cos(\omega t) + C_2\sin(\omega t)## is a solution to the homogeneous problem, but your DE is a nonhomogeneous equation. You need a particular solution ##x_p(t)## such that ##x_p''(t) + \omega^2 x_p(t) = F \sin(\omega t)##.

Do you have any examples of working with nonhomogeneous DEs? If not, take a look at this Insights article - How to Solve Nonhomogeneous Linear ODEs using Annihilators (physicsforums.com)
 
  • Like
Likes Delta2 and berkeman
  • #3
I still can't get the answer..., can you show the answer with steps please??
 
Last edited by a moderator:
  • Like
Likes Delta2
  • #4
Fallen6 said:
I still can't get the answer..., can you show the answer with steps please??
No, you need to do the bulk of the work on your homework problems. Please show us your work that is not getting you to the answer yet -- that will help us to guide you better. Thanks.
 
  • #5
Fallen6 said:
I still can't get the answer..., can you show the answer with steps please??
As already mentioned, this isn't what we do here at PF. Ex. 5 in the link I posted earlier shows an example that is similar to your problem.
 
  • #6
I feel sorry for my ignorant =.=

So, I sub t into my general sol x = At cos wt + Bt cos wt

x' = -Atw sin wt + A cos wt + Btw cos wt + B sin wt

x'' = -Atw^2 cos wt + 2Bw cos wt - Btw^2 sin wt - 2Aw sin wt

#After sub in equation

I get 2Bw cos wt - 2Aw sin wt

Am I wrong from the beginning or I misunderstood something??
 
  • #7
Fallen6 said:
I feel sorry for my ignorant =.=

So, I sub t into my general sol x = At cos wt + Bt cos wt

x' = -Atw sin wt + A cos wt + Btw cos wt + B sin wt

x'' = -Atw^2 cos wt + 2Bw cos wt - Btw^2 sin wt - 2Aw sin wt

#After sub in equation

I get 2Bw cos wt - 2Aw sin wt

Am I wrong from the beginning or I misunderstood something??
So far so good, but you lost your equation.
The original DE was ##x'' + \omega^2x = F\sin(\omega t)##
After substituting for x'' and x, the equation is ##2B\omega \cos(\omega t) - 2A\omega \sin(\omega t) = F\sin(\omega t)##. Solve for A and B, and that will be your particular solution.

Add in the particular solution to get the general solution, which will involve terms of ##\cos(\omega t)## and ##\sin(\omega t)##. Then use the initial conditions to determine the coefficients of the ##\cos(\omega t)## and ##\sin(\omega t)## terms.
 
  • #8
I have no idea how to solve A and B, it is using the initial condition to solve for A and B ??
 
  • #9
Fallen6 said:
I have no idea how to solve A and B, it is using the initial condition to solve for A and B ??
No I think you should solve this equation ##2B\omega\cos\omega t-2A\omega\sin\omega t=F\sin\omega t##. For example one solution is ##B=0,A=-\frac{F}{2\omega}##. Substitute these values of B and A at the general form of the solution of post #6 and you ll have got the particular solution.
 
  • #10
I donnot how to get the A and B value like A = ?, B = ?, and If I get the value of A and B, sub into general sol if it is equal to F sin wt then it is the final answer right?
 
  • #11
No its not the final answer, it is what we call a particular solution.

To find the final answer I THINK you should add the solution to the homogeneous equation and the particular solution.

I am not so sure though I just know how to solve this equation with Laplace/Fourier Transforms, wait for @Mark44 to reply and offer us his light.
 
  • #12
Fallen6 said:
I have no idea how to solve A and B, it is using the initial condition to solve for A and B ??
No. Please reread what I wrote earlier, in post #7.
Mark44 said:
After substituting for x'' and x, the equation is
##2B\omega \cos(\omega t) - 2A\omega \sin(\omega t) = F\sin(\omega t)##. Solve for A and B, and that will be your particular solution.
The part on the left side, above, is the particular solution, or ##x_p(t)##. The equation above has to be true for all values of t, so since the part on the right doesn't contain a cosine term, what can you say about B?

After you find A and B, the general solution will be ##x(t) = C_1\cos(\omega t) + C_2\sin(\omega t) + At\cos(\omega t) + Bt\sin(\omega t)##, but with A and B replaced by the values you found. Then use your initial conditions to determine ##C_1## and ##C_2##.
 
  • Like
Likes Delta2
  • #13
So fat this is what I got.
134313460_442445536775646_7844498038029998481_n.jpg

134399638_402491427530069_4373821814800355288_n.jpg
 
  • #14
Fallen6 said:
So fat this is what I got.
View attachment 275392
View attachment 275393
Your work looks OK to me, but you wrote ##x_p = A\cos(\omega t) + B\sin(\omega t)##. That's a solution to the homogeneous problem (i.e., ##x'' + \omega^2x = 0##, not a particular solution to the nonhomogeneous problem. The work following that seems fine, though.
You've done the hard work -- all you have to do is check that your general solution 1) satisfies the two initial conditions, and 2) satisfies the given differential equation.
 
  • #15
You solved for ##C_1## incorrectly.
 
  • #16
OK thank you all, I will correct my mistakes.
 
  • Like
Likes Delta2

1. What is the undetermined coefficient method?

The undetermined coefficient method is a technique used to solve initial value problems (IVPs) in differential equations. It involves guessing a particular solution to the differential equation based on the form of the non-homogeneous term, and then using this guess to find the coefficients of the solution.

2. When is the undetermined coefficient method used?

The undetermined coefficient method is typically used when the non-homogeneous term in a differential equation is a polynomial, exponential, or trigonometric function. It is also used when the non-homogeneous term is a linear combination of these types of functions.

3. How does the undetermined coefficient method work?

The undetermined coefficient method involves two main steps. First, a particular solution is guessed based on the form of the non-homogeneous term. Then, the coefficients of this guess are determined by plugging it into the original differential equation and solving for the unknown coefficients.

4. What are the advantages of using the undetermined coefficient method?

The undetermined coefficient method is a relatively simple and straightforward technique for solving IVPs in differential equations. It also allows for the use of superposition, meaning that if the non-homogeneous term is a linear combination of functions, the particular solution can be found by adding the particular solutions for each individual function.

5. Are there any limitations to the undetermined coefficient method?

Yes, there are some limitations to the undetermined coefficient method. It may not work for all types of non-homogeneous terms, such as those involving logarithmic or power functions. In these cases, other methods such as variation of parameters may need to be used to find the particular solution.

Similar threads

  • Calculus and Beyond Homework Help
Replies
7
Views
502
  • Calculus and Beyond Homework Help
Replies
7
Views
708
  • Calculus and Beyond Homework Help
Replies
3
Views
572
Replies
12
Views
386
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
993
  • Calculus and Beyond Homework Help
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
11
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
496
  • Calculus and Beyond Homework Help
Replies
14
Views
2K
Back
Top