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

In summary, the method works for this DE: 4y' + 2y = 10\cos(x) and y = \dfrac{ 10\angle{0} }{2 + 4J }. However, it does not work for certain ODE, especially those that I think are in resonance.
  • #1
K Murty
34
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
  • #2
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 K Murty
  • #3
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:
 
  • #4
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 coefficent 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 K Murty

1. What is a complex number?

A complex number is a number that contains a real part and an imaginary part. It is written in the form a + bi, where a is the real part and bi is the imaginary part with the variable i representing the square root of -1.

2. How are complex numbers used in solving O.D.E's?

Complex numbers are used in solving O.D.E's by representing the solutions as complex-valued functions. This allows for a more efficient and elegant solution as compared to using only real-valued functions.

3. What is the phasor transform?

The phasor transform is a mathematical tool used to transform differential equations with time-varying functions into algebraic equations with complex-valued functions. It simplifies the analysis of dynamic systems and is often used in electrical engineering and physics.

4. Can the phasor transform be used for all O.D.E's?

No, the phasor transform is typically used for linear, time-invariant systems. It may not be applicable for nonlinear or time-varying systems.

5. Is it necessary to have a background in complex analysis to use complex numbers for solving O.D.E's?

While having a background in complex analysis can be helpful, it is not necessary to use complex numbers for solving O.D.E's. Basic knowledge of complex numbers and the phasor transform is sufficient for solving many O.D.E's in engineering and physics.

Similar threads

Replies
2
Views
1K
  • Differential Equations
Replies
3
Views
2K
Replies
6
Views
1K
Replies
7
Views
2K
  • Differential Equations
Replies
16
Views
891
Replies
8
Views
1K
  • Differential Equations
Replies
2
Views
985
  • Differential Equations
Replies
10
Views
1K
  • Precalculus Mathematics Homework Help
Replies
18
Views
1K
  • Calculus and Beyond Homework Help
Replies
11
Views
358
Back
Top