2
$\begingroup$

Given a system of forced, coupled, differential equations $$\ddot{x}(t) + \dot{x}(t) + \omega_{z}^{2} x(t) = F_{0} \cos(\omega_{0} t) y(t)$$ $$\ddot{y}(t) + \omega_{y}^{2} y(t) = F_{0} \cos(\omega_{0} t) x(t)$$ which I have solved it with pen and paper.

I'd like to see if Mathematica agrees with me using DSolve. If I follow the same algebraic steps I used to solve the system by hand, but using Mathematica to verify the steps, I get the same result as my pen and paper approach (but that doesn't rule out my method was wrong).

When solving the system by hand I chose solutions $$x(t) = A e^{-i \omega_{x} t} X(t) \quad {\text{and}} \quad y(t) = B e^{-i \omega_{y} t} Y(t)$$ where I make the assumption $\ddot{X}(t) = \ddot{Y}(t) = 0$.

My Mathematica approach is

x[t] = A Exp[-I wx t] X[t];
y[t] = B Exp[-I wy t] Y[t];

X''[t] = 0; 
Y''[t] = 0;

xSystem = D[x[t], {t, 2}] + D[x[t], t] + wz^2 x[t] == F0 Cos[w0 t] y[t]
ySystem = D[y[t], {t, 2}] + wy^2 y[t] == F0 Cos[w0 t] z[t]

DSolve[
            {
                xSystem , ySystem , 
                X[0] == X0, X'[0] == vX0, Y[0] == Y0, Y'[0] == vY0
            },  {X[t], Y[t]}, t
      ]

This returns the error:

For some branches of the general solution, the given boundary conditions lead to an empty solution

What am I missing? I am also open to other alternatives, DSolve is simply the approach i first reached for.

$\endgroup$
3
  • 2
    $\begingroup$ What do you think will happen to your ode's when you add X''[t] = 0; Y''[t] = 0; ? Try xSystem /. X''[t] -> 0; ySystem /. Y''[t] -> 0 and you will see they become first order odes's now in X and Y. Basically you deleted the second order derivatives from your odes. I have no idea why you did that, but If you remove X''[t] = 0; Y''[t] = 0; then it will solve them (with some internal warnings from Solve. $\endgroup$
    – Nasser
    Jan 10 at 11:45
  • 2
    $\begingroup$ If you want to set this condition X''=Y''=0 then first solve the ode's for X and Y as second order odes', then take second derivatives of the solutions found, and only then set up this equation. i.e. do it after solving. not before solving. $\endgroup$
    – Nasser
    Jan 10 at 11:54
  • $\begingroup$ Okay removing the `X''[t] = 0; Y''[t] = 0;' did indeed improve things, albeit with a strange integral identity in the solution. Could you show me what you mean in your second comment? $\endgroup$
    – user27119
    Jan 10 at 12:32

1 Answer 1

4
$\begingroup$

Could you show me what you mean in your second comment?

This is little too long for comment. But basically solve the system, then set up your equation you wanted. I admit I do not understand why you are doing this. i.e. what is the point of $X''(t)=0,Y''(t)=0$ but you know better than me about this.

ClearAll["Globals`*"]
x[t_] := A Exp[-I wx t] X[t];
y[t_] := B Exp[-I wy t] Y[t];
xSystem = D[x[t], {t, 2}] + D[x[t], t] + wz^2 x[t] == F0 Cos[w0 t] y[t]
ySystem = D[y[t], {t, 2}] + wy^2 y[t] == F0 Cos[w0 t] z[t]
ode = {xSystem, ySystem}
ic = {X[0] == X0, X'[0] == vX0, Y[0] == Y0, Y'[0] == vY0};
{solX, solY} = DSolveValue[{ode, ic}, {X[t], Y[t]}, t];

And now your equations are

eq1 = D[solX, {t, 2}] == 0;
eq2 = D[solY, {t, 2}] == 0;

They are very long and complicated with integrals in them.

If you explain better why you wanted these equations may be this will help. But the above does what you want.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.