Using complex numbers or phasor transform to solve O.D.E's

Click For Summary

Discussion Overview

The discussion revolves around the use of complex numbers and phasor transforms in solving ordinary differential equations (ODEs), particularly focusing on finding particular solutions. Participants explore the applicability of these methods in various scenarios, including cases of resonance and contradictions arising from certain ODEs.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant demonstrates the use of complex numbers to solve the ODE \(4y' + 2y = 10\cos(x)\) and derives a particular solution using phasor representation.
  • Another participant notes that the method fails for certain ODEs, particularly those in resonance, such as \(y''' - 4y' = 4 \sin(2x)\), and provides a different solution that contrasts with a computational tool's output.
  • Participants discuss the contradiction encountered when applying the method to \(y'' + y = \cos(x)\), leading to an invalid result of \(y \cdot 0 = 1\).
  • Suggestions are made for alternative approaches, including the method of annihilators and using a modified form for particular solutions when the homogeneous solution includes the same functions as the forcing function.
  • One participant offers a simpler method for solving the first DE by finding the homogeneous solution and proposing a standard form for the particular solution.

Areas of Agreement / Disagreement

Participants express differing views on the effectiveness of using complex numbers for finding particular solutions in ODEs. While some find it useful, others highlight limitations and propose alternative methods. The discussion remains unresolved regarding the best approach for cases involving resonance.

Contextual Notes

Participants mention that the solutions differ only by a constant in some cases, indicating potential dependencies on initial conditions or specific forms of solutions. There is also a recognition of the need for careful selection of solution forms based on the characteristics of the ODE.

Who May Find This Useful

This discussion may be useful for students and practitioners of differential equations, particularly those interested in methods for solving ODEs involving sinusoidal forcing functions and resonance phenomena.

K Murty
Messages
34
Reaction score
17
Hi
particular solution only.
As an example of what I am talking about, this method works for this DE:
$$
4y' + 2y = 10\cos(x) \\ \\

10 \cos(x) = \Re( 10 e^{j(x)} ) = \Re(e^{j(x)} \cdot e^{j(0)} ) \rightarrow \text{complex number that captures the amplitude and phase of 10 cos x is} \\ 10 \angle{0} = 10 \\

\text{using the property of exponentials that} {\dfrac{d^{n}}{dx^{n}} e^{j(ax) } = {(aj)}^{n} e^{j(ax) }} \\ \\ \text{Since forcing function is sinusoid y is a sinusoid too of the same angular velocity}
\\

\\ a = 1\\ \text{Angular velocity is one} \\
\\
4J y + 2y = 10\angle{0} \\
\\
y (4J + 2) = 10\angle{0} \\

y = \dfrac{ 10\angle{0} }{2 + 4J } \\ \dfrac{ 10}{ \sqrt{2^2 + 4^2} } \angle{ - \arctan(\frac{4}{2}) } \rightarrow \sqrt{5} \cos(x - \arctan(2) )
\\ \\
y_{p} = \sqrt{5} \cos(x - \arctan(2) )

$$

But it does not work for certain ODE, especially those that I think are in resonance:
$$
y''' - 4y' = 4 \sin(2x)
$$
For the function above, I got the answer as:
$$
y_{p} = \dfrac{1}{4} \cos(2x)
$$
But the wolfram alpha displays the answer for the particular solution as:
$$
\dfrac{ \cos^2(x)}{2}
$$
In this one other example, the method leads to a contradiction:
$$
y'' + y = \cos(x) \\
\text{Solving using method above leads to contradiction} \\ y \cdot 0 = 1
$$
My general questions are, how can I know when to avoid using complex numbers to find the particular solution of ODES?
And secondly, can anyone refer me to something that explains how to solve an ODE in resonance when the forcing function is a trigonometric function (sinusoids only)?
 
Last edited:
Physics news on Phys.org
K Murty said:
Hi
particular solution only.
As an example of what I am talking about, this method works for this DE:
$$
4y' + 2y = 10\cos(x) \\ \\

10 \cos(x) = \Re( 10 e^{j(x)} ) = \Re(e^{j(x)} \cdot e^{j(0)} ) \rightarrow \text{complex number that captures the amplitude and phase of 10 cos x is} \\ 10 \angle{0} = 10 \\

\text{using the property of exponentials that} {\dfrac{d^{n}}{dx^{n}} e^{j(ax) } = {(aj)}^{n} e^{j(ax) }} \\ \\ \text{Since forcing function is sinusoid y is a sinusoid too of the same angular velocity}
\\

\\ a = 1\\ \text{Angular velocity is one} \\
\\
4J y + 2y = 10\angle{0} \\
\\
y (4J + 2) = 10\angle{0} \\

y = \dfrac{ 10\angle{0} }{2 + 4J } \\ \dfrac{ 10}{ \sqrt{2^2 + 4^2} } \angle{ - \arctan(\frac{4}{2}) } \rightarrow \sqrt{5} \cos(x - \arctan(2) )
\\ \\
y_{p} = \sqrt{5} \cos(x - \arctan(2) )

$$

But it does not work for certain ODE, especially those that I think are in resonance:
$$
y''' - 4y' = 4 \sin(2x)
$$
For the function above, I got the answer as:
$$
y_{p} = \dfrac{1}{4} \cos(2x)
$$
But the wolfram alpha displays the answer for the particular solution as:
$$
\dfrac{ \cos^2(x)}{2}
$$
Your solution and wolframalpha's differ only by a constant, so both are solutions. ##\cos^2(x) = \frac 1 2 \cos(2x) + \frac 1 2##. A bit of algebra gets you from wolfram's solution to yours (disregarding the constant).
K Murty said:
In this one other example, the method leads to a contradiction:
$$
y'' + y = \cos(x) \\
\text{Solving using method above leads to contradiction} \\ y \cdot 0 = 1
$$
A basis for the solution set of y'' + y = 0 (the homogeneous equation) is ##\{\sin(x), \cos(x) \}##, so no multiple of either of these will do for a particular solution of your nonhomogeneous equation. Try ##y_p = Ax\cos(x) + Bx\sin(x)## for a particular solution, and substutute into the nonhomogeneous equation to solve for the coefficients A and B.

One technique that can be used is the method of annihilators. I wrote an Insights article (https://www.physicsforums.com/insights/solving-nonhomogeneous-linear-odes-using-annihilators/) on this technique, which can be used on nonhomogeneous DEs. There's another one, https://www.physicsforums.com/insights/solving-homogeneous-linear-odes-using-annihilators/, that deals with homogeneous DEs.
K Murty said:
My general questions are, how can I know when to avoid using complex numbers to find the particular solution of ODES?
And secondly, can anyone refer me to something that explains how to solve an ODE in resonance when the forcing function is a trigonometric function (sinusoids only)?
See my comment above.
 
  • Like
Likes   Reactions: K Murty
Mark44 said:
Your solution and wolframalpha's differ only by a constant, so both are solutions. ##\cos^2(x) = \frac 1 2 \cos(2x) + \frac 1 2##. A bit of algebra gets you from wolfram's solution to yours (disregarding the constant).
A basis for the solution set of y'' + y = 0 (the homogeneous equation) is ##\{\sin(x), \cos(x) \}##, so no multiple of either of these will do for a particular solution of your nonhomogeneous equation. Try ##y_p = Ax\cos(x) + Bx\sin(x)## for a particular solution, and substutute into the nonhomogeneous equation to solve for the coefficients A and B.

One technique that can be used is the method of annihilators. I wrote an Insights article (https://www.physicsforums.com/insights/solving-nonhomogeneous-linear-odes-using-annihilators/) on this technique, which can be used on nonhomogeneous DEs. There's another one, https://www.physicsforums.com/insights/solving-homogeneous-linear-odes-using-annihilators/, that deals with homogeneous DEs.
See my comment above.
Thanks a lot, I will read the insights too. :) :biggrin:
 
By the way, there are at least two other ways to solve the first DE you listed, both of which are simpler.

Here's one of them.
4y' + 2y = 10cos(x)
The related homogeneous DE is
4y' + 2y = 0, or equivalently 2y' + y = 0

This is a linear, constant coefficient homogeneous DE.
Try a solution of the form ##y = e^{rx}##
Then ##y' = re^{rx}##
Substituting, we get ##2re^{rx} + e^{rx} = 0 \Rightarrow (2r + 1)e^{rx} = 0##
Solve for r to get r = -1/2
Solution of homogeneous problem: ##y_h = Ce^{-x/2}##

For the nonhomogeneous problem 4y' + 2y = 10cos(x), try a solution of the form ##y_p = A\cos(x) + B\sin(x)##.
Substitute this into the DE and solve for the coefficients A and B.
The general solution will be ##y_h + y_p##, or in this case, ##y = Ce^{0.5x} + 1\cos(x) + 2\sin(x)##
To get a value for the constant C, you need an initial condition.
 
  • Like
Likes   Reactions: K Murty

Similar threads

Replies
8
Views
2K
  • · Replies 7 ·
Replies
7
Views
5K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
861
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
5
Views
2K