How to solve the ODE y'' + y = sin(x)

  • Thread starter toastie
  • Start date
  • Tags
    Ode
In summary, the conversation discusses solving the equation y"+y=sinx with initial conditions y(90 deg) = 3 and y(45 deg) = 2. The attempt at a solution involves finding the values of c1 and c2 and using them to find the final solution for y. However, the equation has an exceptional case where the usual method does not work due to the presence of the term sin x on both sides. The textbook may have a solution for this case.
  • #1
toastie
46
0

Homework Statement


y"+y=sinx

initial conditions: y(90 deg) = 3, y(45 deg) = 2

Calculate y at x = -1


Homework Equations


y=u+v


The Attempt at a Solution



I have gotten the following:

r^2 + 1 = 0 Therefore, r1=i and r2 = -i

u=(c1)cosx + (c2)sinx

v=Asinx + Bcosx
v'=Acosx - Bsinx
v"=-Asinx - Bcosx

-Asinx -Bcosx + Asinx + Bcosx - sinx = 0

everything cancels down to: -sinx = 0. Thus, v=0

Then I get,

y=(c1)cosx + (c2)sinx + 0

y(45 deg) shows that c2=2

y(90 deg) shows that c1=3

Thus, y=3cosx + 2sinx

y(-1) = -.06204

Could someone please let me know where I am making a mistake?

Thank you in advance!
 
Physics news on Phys.org
  • #2


The solution of the homogeneous case has terms cos x and sin x in it. The right-hand-side *also* has one of those terms in it. Presumably your textbook has the information of what to do in this exceptional case... as you found, the usual method does not work.
 

1. What is a second-order differential equation?

A second-order differential equation (ODE) is a mathematical equation that involves the second derivative of a function. It is often used to model physical phenomena in science and engineering.

2. How do I solve a second-order ODE?

To solve a second-order ODE, you can use various methods such as separation of variables, substitution, and integration. In the case of the ODE y'' + y = sin(x), you can use the method of undetermined coefficients or the method of variation of parameters.

3. What is the solution to the ODE y'' + y = sin(x)?

The general solution to this ODE is y(x) = c1cos(x) + c2sin(x) - 1/2cos(x), where c1 and c2 are arbitrary constants. This solution can be obtained by using the method of undetermined coefficients.

4. Can I use a computer to solve this ODE?

Yes, you can use numerical methods or software programs such as MATLAB or Mathematica to solve this ODE. These methods use a computer to approximate the solution to the ODE.

5. What are the applications of the ODE y'' + y = sin(x)?

This ODE has various applications in physics, engineering, and mathematics. For example, it can be used to model the motion of a mass-spring system or the behavior of a damped harmonic oscillator. It can also be used to solve problems in heat transfer, electrical circuits, and fluid dynamics.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
10
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
370
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Precalculus Mathematics Homework Help
Replies
16
Views
2K
  • Calculus and Beyond Homework Help
Replies
4
Views
614
  • Calculus and Beyond Homework Help
Replies
2
Views
822
  • Calculus and Beyond Homework Help
Replies
6
Views
2K
Back
Top