       Re: Can someone tell me why NDso

• To: mathgroup at smc.vnet.net
• Subject: [mg44058] Re: Can someone tell me why NDso
• From: "Peter Pein" <nospam at spam.no>
• Date: Sun, 19 Oct 2003 01:11:13 -0400 (EDT)
• References: <200310180712.DAA28012@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```lve isn't working here?

Five out of six functions do not occur as derivatives w.r.t. t:
Fx,Rx,Fy,Ry and if you rename x''[t] as x2[t]!

you'll get a single DE.

In:=
eqns = {Fx[t] + Rx[t] == 2*M*Derivative[x][t], Fy[t] + Ry[t] == 0,
Fx[t]*R == -(M*R*Derivative[x][t]),
-Rx[t] == (1*L*M*Sin[-\[Theta][t]]*Derivative[\[Theta]][t]^2)/2 +
M*Derivative[x][t] +
(1*L*M*Cos[-\[Theta][t]]*Derivative[\[Theta]][t])/2,
-Ry[t] == (1*M*L*Derivative[\[Theta]][t]*Sin[-\[Theta][t]])/2 -
(1*M*L*Derivative[\[Theta]][t]^2*Cos[-\[Theta][t]])/2,
(1*L*Sin[\[Theta][t]])/2 - (1*L*Cos[\[Theta][t]]*Rx[t])/2 ==
(1*M*L^2*Derivative[\[Theta]][t])/
12};
In:=
eq2 = Collect[Eliminate[eqns, {Derivative[x][t], Fx[t], Fy[t], Ry[t],
Rx[t]}],
{\[Theta], Derivative[\[Theta]], Derivative[\[Theta]]},
FullSimplify]
Out=
L*R*(6*Sin[\[Theta][t]]*(3*L*M*Cos[\[Theta][t]]*Derivative[\[Theta]][t]^2
- 8) -
L*M*(9*Cos[2*\[Theta][t]] + 1)*Derivative[\[Theta]][t]) == 0
In:=
R = 1; M = 1; L = 1;
f = \[Theta] /. NDSolve[eq2 && \[Theta] == Pi/2 &&
Derivative[\[Theta]] == -((3*Pi)/4), \[Theta],
{t, 0, 1}][];
NDSolve::"ndsz": "At \!\(t\) == \!\(0.9027410098372591`\), step size is \
effectively zero; singularity suspected."

Peter Pein, Berlin
petsie at arcAND.de
replace && by || to write to me

----- Original Message -----
From: "Mizrandir" <mizrandir at hotmail.com>
To: mathgroup at smc.vnet.net
Subject: [mg44058]  Can someone tell me why NDsolve isn't working here?

> Hello, Im trying to solve a system of 6 differential equations with
> NDSolve but I can't get Mathematica to do it. I wrote:
>
> R = 1;
> M = 1;
> L = 1;
> NDSolve[{Rx[t] + Fx[t] == 2M x''[t], Ry[t] + Fy[t] == 0,
>     Fx[t] R == -M R x''[t], -Rx[t] ==
>       M x''[t] + (M L \[Theta]''[t] Cos[-\[Theta][t]])/
>           2 + (M L \[Theta]'[t]^2 Sin[-\[Theta][t]])/2, -Ry[
>           t] == (M L \[Theta]''[t] Sin[-\[Theta][t]])/
>           2 - (M L \[Theta]'[t]^2 Cos[-\[Theta][t]])/
>           2, -(L Cos[\[Theta][t]] Rx[t])/2 + (L Sin[\[Theta][t]])/
>           2 == (M L^2 \[Theta]''[t])/12, x == 0, \[Theta] ==
> Pi/2,
>     Ry == -M/2, Rx == 0, Fy == 5M/2, Fx == 0}, {x,
> \[Theta], Ry,
>     Rx, Fy, Fx}, {t, 0, 1}]
>
> And Mathematica gave me the following error:
>
> NDSolve::"ndode": "Input is not an ordinary differential equation."
>
> Does anybody know what am I doing wrong. Can I use Mathematica to
> solve this?
>