Checking some linear ODE solutions

  • MHB
  • Thread starter Dustinsfl
  • Start date
  • Tags
    Linear Ode
In summary: No, the only thing wrong with your original solution was the value of \(c_{1}\) which you had as \(c_{1}=-1/2\). Other than that, everything is correct.The value of \(c_{2}\) is also incorrect. It should be, \(c_{2}=-i/2\). Then you will get,\[y_p = \frac{t}{2}\sin t -\frac{it}{2}e^{it} -\frac{1}{8}e^{3it}\]The general solution is,\[y=Ce^{it}+De^{-it}-\frac{1}{8}e^{3it}-\frac{it}{2
  • #1
Dustinsfl
2,281
5
$y''+y = e^{it}+e^{3it}$

Solution

$y = Ae^{it}-\dfrac{1}{8}e^{3it}-\dfrac{it}{2}e^{it}$

and

$y''+4y=1+\sin t+\sin 2t$

Solution

$y=A\cos 2t + B\sin 2t + \dfrac{1}{4} + \dfrac{1}{3}\sin t - \dfrac{t}{4}\cos 2t$

Correct?
 
Physics news on Phys.org
  • #2
Hi dwsmith, :)

dwsmith said:
$y''+y = e^{it}+e^{3it}$

Solution

$y = Ae^{it}-\dfrac{1}{8}e^{3it}-\dfrac{it}{2}e^{it}$
This seem to be incorrect. There should be two arbitrary constants since that is a second order differential equation. The correct solution can be found here.

dwsmith said:
$y''+4y=1+\sin t+\sin 2t$

Solution

$y=A\cos 2t + B\sin 2t + \dfrac{1}{4} + \dfrac{1}{3}\sin t - \dfrac{t}{4}\cos 2t$

Correct?

This seems correct. See this.

Kind Regards,
Sudharaka.
 
  • #3
dwsmith said:
$y''+y = e^{it}+e^{3it}$

Solution

$y = Ae^{it}-\dfrac{1}{8}e^{3it}-\dfrac{it}{2}e^{it}$

When you solve inhomogeneous linear constant coefficient ODE's you start with the general solution to the homogeneous equation, which in this case is:

\( y''+y=0\)

You use a trial solution \(y=e^{\lambda t}\) and get the charateristic equation \(\lambda^2+1=0\), which has roots \( \lambda=\pm i\).

So the general solution to the homogeneous equation is \(y=Ae^{it}+Be^{-it}\), and you get the general solution to the inhomogeneous equation by adding a particular integral of the equation to this.

Note this solution could also be expressed in terms of trig functions like your next example.

(Also it would be helpful if you posted the full question/s with the original wording).

CB
 
  • #4
Online Mathematica says the solution is $y=A\cos t + B\sin t -\dfrac{it}{2}e^{it} + \dfrac{1}{4}e^{it} - \dfrac{1}{8}e^{3it}$.

However, I can't obtain it.

So $y_c = Ce^{\pm it} = A\cos t + B\sin t$

If we re-write the problem, we have
$$
y''+y=\cos t + \sin t + e^{3it}
$$
Then the form of $y_p = c_1t\cos t + c_2t\sin t + c_3e^{3it}$

$y''_p=-2c_1\sin t + 2c_2\cos t - c_1t\cos t -c_2t\sin t - 9c_3e^{3it}$

Then
$$
y''+y = -2c_1\sin t +2c_2\cos t -8c_3e^{3it}
$$
So $c_1 = \dfrac{-1}{2}$, $c_2 = \dfrac{1}{2}$, and $c_3 = -\dfrac{1}{8}$

Therefore, $y_p = \dfrac{-t}{2}\cos t + \dfrac{t}{2}\sin t - \dfrac{1}{8}e^{3it}$

So
$$
y=y_c+y_p=A\cos t + B\sin t-\dfrac{t}{2}\cos t + \dfrac{t}{2}\sin t - \dfrac{1}{8}e^{3it}
$$

So what is going wrong?
 
  • #5
dwsmith said:
If we re-write the problem, we have
\[y''+y=\cos t + \sin t + e^{3it}\]

Hi dwsmith, :)

This is incorrect. You are missing an \(i\). The correct expression is,

\[y''+y=\cos t + i\sin t + e^{3it}\]

Kind Regards,
Sudharaka.
 
  • #6
dwsmith said:
Online Mathematica says the solution is $y=A\cos t + B\sin t -\dfrac{it}{2}e^{it} + \dfrac{1}{4}e^{it} - \dfrac{1}{8}e^{3it}$.

That is the same thing as:

\[y=Ce^{it}+De^{-it}-\frac{1}{8}e^{3it}-\frac{it}{2}e^{it}=Ee^{it}+De^{-it}+\frac{1}{4}e^{it}-\frac{1}{8}e^{3it}-\frac{it}{2}e^{it}\]

To show this write the first two exponentials on the left in Cartesian form, and remember that the coefficients are arbitrary so (most) any transformation you need applied to them still leave you with arbitrary coefficients (also note that they may be complex).

CB
 
  • #7
I don't see how the term with the 1/4 appears at all.

Writing the equation as $y''+y = \cos t + i\sin t + e^{3it}$ didn't produce anything promising.

Then $y_p = c_1t\cos t + c_2it\sin t + c_3e^{3it}$ so $y''_p = -2c_1\sin t - c_1t\cos t +2c_2i\cos t - c_2it\sin t -9c_3e^{3it}$.

$y''_p+y_p = 2c_2i\cos t - 2c_1\sin t - 8c_3e^{3it}$

So $c_1 = -1/2$, $c_2 = -i/2$, and $c_3 = -1/8$.

$$
y_p = -1/2t\cos t + 1/2t\sin t -1/8e^{3it}
$$
 
  • #8
dwsmith said:
I don't see how the term with the 1/4 appears at all.

Writing the equation as $y''+y = \cos t + i\sin t + e^{3it}$ didn't produce anything promising.

Then $y_p = c_1t\cos t + c_2it\sin t + c_3e^{3it}$ so $y''_p = -2c_1\sin t - c_1t\cos t +2c_2i\cos t - c_2it\sin t -9c_3e^{3it}$.

$y''_p+y_p = 2c_2i\cos t - 2c_1\sin t - 8c_3e^{3it}$

So $c_1 = -1/2$, $c_2 = -i/2$, and $c_3 = -1/8$.

$$
y_p = -1/2t\cos t + 1/2t\sin t -1/8e^{3it}
$$

The coefficient \(c_{1}\) is incorrect. It should be, \(c_{1}=-\dfrac{i}{2}\). Then you will get,

\[y_p = -\frac{it}{2}\cos t + \frac{t}{2}\sin t -\frac{1}{8}e^{3it}\]

\[y_p = -\frac{it}{2}e^{it} -\frac{1}{8}e^{3it}\]

The general solution is,

\[y=Ce^{it}+De^{-it}-\frac{1}{8}e^{3it}-\frac{it}{2}e^{it}\]

This can be written as,

\[y=\left(C-\frac{1}{4}+\frac{1}{4}\right)e^{it}+De^{-it}-\frac{1}{8}e^{3it}-\frac{it}{2}e^{it}\]

\[\therefore y=\left(C-\frac{1}{4}\right)e^{it}+De^{-it}+\frac{1}{4}e^{it}-\frac{1}{8}e^{3it}-\frac{it}{2}e^{it}\]

Let \(\displaystyle E=\left(C-\frac{1}{4}\right)\). Then,

\[y=Ee^{it}+De^{-it}+\frac{1}{4}e^{it}-\frac{1}{8}e^{3it}-\frac{it}{2}e^{it}\]

Does this clarify your doubts? :)
 
  • #9
Sudharaka said:
The coefficient \(c_{1}\) is incorrect. It should be, \(c_{1}=-\dfrac{i}{2}\). Then you will get,

\[y_p = -\frac{it}{2}\cos t + \frac{t}{2}\sin t -\frac{1}{8}e^{3it}\]

\[y_p = -\frac{it}{2}e^{it} -\frac{1}{8}e^{3it}\]

The general solution is,

\[y=Ce^{it}+De^{-it}-\frac{1}{8}e^{3it}-\frac{it}{2}e^{it}\]

This can be written as,

\[y=\left(C-\frac{1}{4}+\frac{1}{4}\right)e^{it}+De^{-it}-\frac{1}{8}e^{3it}-\frac{it}{2}e^{it}\]

\[\therefore y=\left(C-\frac{1}{4}\right)e^{it}+De^{-it}+\frac{1}{4}e^{it}-\frac{1}{8}e^{3it}-\frac{it}{2}e^{it}\]

Let \(\displaystyle E=\left(C-\frac{1}{4}\right)\). Then,

\[y=Ee^{it}+De^{-it}+\frac{1}{4}e^{it}-\frac{1}{8}e^{3it}-\frac{it}{2}e^{it}\]

Does this clarify your doubts? :)

So the only thing wrong with my original solution was that it was missing $Be^{-it}$ then. Why didn't you all say that to begin with?
 

FAQ: Checking some linear ODE solutions

What are linear ODE solutions?

Linear ODE (Ordinary Differential Equation) solutions refer to the solutions of differential equations that are linear in both dependent and independent variables. In other words, the dependent variable and its derivatives appear in a linear form in the equation.

How do you check if a solution to a linear ODE is correct?

To check if a solution to a linear ODE is correct, you can substitute the solution into the original differential equation and see if it satisfies the equation. Additionally, you can also check if the solution satisfies any initial or boundary conditions that may be given.

What methods are used to solve linear ODEs?

There are various methods used to solve linear ODEs, such as separation of variables, method of undetermined coefficients, variation of parameters, and Laplace transform. The choice of method depends on the form of the ODE and its initial or boundary conditions.

Can linear ODE solutions be verified using software?

Yes, there are many software programs that can be used to solve and verify linear ODE solutions. Some popular ones include Wolfram Mathematica, MATLAB, and Maple. These programs use numerical methods to approximate solutions and can also check if a given solution satisfies the ODE.

Are there any common mistakes to avoid when checking linear ODE solutions?

One common mistake to avoid when checking linear ODE solutions is not considering the possibility of multiple solutions. It is important to check if a given solution is the general solution or a particular solution. Additionally, it is important to double-check any calculations and to make sure all initial or boundary conditions are satisfied.

Similar threads

Replies
2
Views
1K
Replies
3
Views
1K
Replies
5
Views
2K
Replies
4
Views
4K
Replies
1
Views
1K
Replies
5
Views
1K
Replies
4
Views
1K
Back
Top