Preben Alsholm

MaplePrimes Activity


These are replies submitted by Preben Alsholm

It is the latter result which is compact, not the former :-)

@MapleFans001 

After replacing the last equation's Diff(f3(t),t,t) by Diff(f4(t),t,t) and changing the initial conditions so that you don't get the trivial zero solution, e.g. to

ic := {f1(0)=0, f2(0)=0, f3(0)=0, f4(0)=0, D(f1)(0)=0, D(f2)(0)=0, D(f3)(0)=0,D(f4)(0)=1};

you can do:

dsol := dsolve(ex1 union ic, numeric);
dsol(3);
with(plots):
#Graphs of all 4:
odeplot(dsol, [seq([t, cat(f,i)(t)],i=1..4)], 0..100,thickness=2);

#f4 versus f2:
odeplot(dsol, [f2(t),f4(t)], 0..100,thickness=2);

#diff(f4(t),t) versus f2:

odeplot(dsol, [f2(t),diff(f4(t),t)], 0..100,thickness=2);
# 3-dim:

odeplot(dsol, [f2(t),f4(t),diff(f4(t),t)], 0..100,thickness=2,axes=boxed);

You don't need to use phaseportrait, and notice that the help page for phaseportrait (and DEplot) says that it requires "a list or set of first order ordinary differential equations, or a single differential equation of any order".

@MapleFans001 

After replacing the last equation's Diff(f3(t),t,t) by Diff(f4(t),t,t) and changing the initial conditions so that you don't get the trivial zero solution, e.g. to

ic := {f1(0)=0, f2(0)=0, f3(0)=0, f4(0)=0, D(f1)(0)=0, D(f2)(0)=0, D(f3)(0)=0,D(f4)(0)=1};

you can do:

dsol := dsolve(ex1 union ic, numeric);
dsol(3);
with(plots):
#Graphs of all 4:
odeplot(dsol, [seq([t, cat(f,i)(t)],i=1..4)], 0..100,thickness=2);

#f4 versus f2:
odeplot(dsol, [f2(t),f4(t)], 0..100,thickness=2);

#diff(f4(t),t) versus f2:

odeplot(dsol, [f2(t),diff(f4(t),t)], 0..100,thickness=2);
# 3-dim:

odeplot(dsol, [f2(t),f4(t),diff(f4(t),t)], 0..100,thickness=2,axes=boxed);

You don't need to use phaseportrait, and notice that the help page for phaseportrait (and DEplot) says that it requires "a list or set of first order ordinary differential equations, or a single differential equation of any order".

In the first equation there is a variable t1 which should be t and an f that perhaps should be f1?

Diff(f1(t), t$2)
+ 2*(-G*M/(r*(-r*c^2+2*G*M)))*Diff(f(t), t1)*Diff(f2(t), t) = 0

Besides that, are your equations correct? Should the last equation have Diff(f4(t),t,t) instead of Diff(f3(t),t,t)?

(Did you mean Pi/2 instead of 90 for theta?)

If you provide us with the function in question then you are more likely to get useful answers.

If I count correctly then there are 6*nn + (nk+1)*Q variables and the same number of equations.

In order to use GenerateMatrix you need nn, nk, and Q to be positive integers, and you should replace Sum by sum (using value e.g.) or replace Sum by add.

If I count correctly then there are 6*nn + (nk+1)*Q variables and the same number of equations.

In order to use GenerateMatrix you need nn, nk, and Q to be positive integers, and you should replace Sum by sum (using value e.g.) or replace Sum by add.

But the problem was the type check. So if that is added then you still need '',

x := (i::integer) -> i^2:
sum(x(m), m=1..3);
sum('x(m)', m=1..3);

But the problem was the type check. So if that is added then you still need '',

x := (i::integer) -> i^2:
sum(x(m), m=1..3);
sum('x(m)', m=1..3);

@alex_01 Knowing nothing about what you are trying to do, I tried doing

eval(ob,{x[1]=0,x[2]=0,x[3]=0});

which results in  0.8571428571/x[4], which means that with the constraint con1 you can make this as small (and negative) as you like.

Did you leave something out?

@alex_01 Knowing nothing about what you are trying to do, I tried doing

eval(ob,{x[1]=0,x[2]=0,x[3]=0});

which results in  0.8571428571/x[4], which means that with the constraint con1 you can make this as small (and negative) as you like.

Did you leave something out?

This seems to be a known problem. It is apparently not easy to fix, or it would have been done a long time ago.

In the help page for solvefor we read:

Important: The solvefor command has been deprecated.  Use the superseding command solve instead.

In the help page for solvefor we read:

Important: The solvefor command has been deprecated.  Use the superseding command solve instead.

First 212 213 214 215 216 217 218 Last Page 214 of 231