Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Dear all

 

I have a confusion between these symbol

Sum , add and sum

If we consider u(n) is a sequence and n integer

and what is the difference between 

sum( u(n),n=0..infinity)

Sum(u(n),n=0..infinity)

and sum('u(n)', n=0..infinity)

Many thanks

HI all,

 

I have 

> sol2 := dsolve({odesys, H(0) = 4995, R(0) = 65000, W(0) = 102000, l(0) = 96000}, numeric, method = rosenbrock);
print(`output redirected...`); 
proc(x_rosenbrock) ... end;

 

I want to have a list of my solutions, t, H(t), R(t), W(t), l(t) that I can put into a spreadsheet (.csv, .txt, etc.), for 600 timesteps. 

 

There are some answers out there, but I am confused by them, and have not been able to make it work.

 

Thanks!

 

How can I simplify $\sqrt{1−r^2\exp(2i\theta)}$ in Maple. I could do it by hand but I need this type of simplification later for far more complicated expressions.  I allready tried to enter this as a complex number using II, but simplify(...,'symbolic') didn't simplify this expression. Any suggestion?

I have a nonlinear function Q(a,b,c,d,x,y) and I'd like to get the optimum (x*,y*) for different values of (a,b,c,d). The usual sintax:

NLPSolve(Q(10, 1, 5, 2, x,y), x= 0 .. 50, y = 0 .. 50, initialpoint = {x = 2,y= .5}, assume = nonnegative) does not work when Q contains numerical integration, that is evalf (Int). I have no problem with the definite integral evalf(int). The problem is that most of the cases required numerical integration so I need the former expression.

I'd appreciate very much if someone could help me.

Hi,

how can I check in maple if my variable P is positive (always or only for some certain conditions)

P=(exp(a-1)-exp(g-1))*(b*d*(f-g)-b*g*(a-e)-g*(a-c)*(a-e)))/((a-g)*b*d) + exp(g-1)*(((a-c)*(a-e))/b*d + (a-e)/d + 1)

with assumptions

a>0,b>0,c>0,d>0,e>0,f>0,g>0 and a>c,e,g

I need to prove that P is always positive with that assumptions, how?

While performing integration of some expessions I bumped into a strange problem. My expession consists of quite a lot of terms, but here I present the susbset of only 2. If I integrate it as a whole maple does not want to solve it, and leaves it as there was no closed expression to this integral. But if I split this sum and integrate the parts, it all works fine. What is happening here? What do I miss? I used simplify and allvalues but didn't change a thing...

Is there a way to split my terms into list, integrate one by one and they recreate the solution by summing the parts? Its a bit of a workaround, but surely better that doing it manually (I have around 50 terms). I use Maple 2015

Thanks,

Jeremi

Good morning everybody.

I have tried Explore to draw plots in an interactive way.

The function I want to draw (plot3d) is automatically constructed by a specific code, as well as the names of the parameters it depends on. These are of the form P||1, P||2, ...P||N (N is an integer determined during the construction)

... but I did not succeed !

After some investigations I was able to reduced the problem to the following one

N  := 2:
F  := add(P||k * x^k, k=0..N):
G := [seq(P||k=-1.0 .. 1.0, k=0..N)]:
Explore(plot(F, x=0..1), parameters=G)

The result is the classical imbedded window with a plot of -1-x_x^2 and three sliders below.
But as soon as I push anu of them the plot disappears and connot be recoverd.


But the following sequence seems to work as expected

N  := 2:
F  := add(P__k * x^k, k=0..N):
G := [seq(P__k=-1.0 .. 1.0, k=0..N)]:
Explore(plot(F, x=0..1), parameters=G)



Before changing my code, could you please confirm me that parameter names such that P||k are not correctly accounted for by Explore ?


Auxiliary question : more generally, are there points which I have to count carefully when I use the P||k construction ?

Thanks in advance

Hello,

a=number      b=number

=maple("Qm:=x->(diff(KelvinBei(0,x),x)*psi2(x)-(diff(KelvinBer(0,x),x)*psi1(x)))/&1";B11)

=maple("Qv:=x->(&1*psi2(x)-(&2*psi1(x)))/(&3*&4)";B6;B7;B2;B11)

=maple("Fm:=x->(Qv(x)+(&1*Qm(x)))/2";B3)

I need abs(max(Fm(x))) and abs(min(Fm(x))) values of function Fm(x), locals, for a<x<b in excel.

Now I use a vector to do this, but I need an exact values not an approximation of a fuction evaluated with n values of x.

what I do:

=maple("seq(i,i=&1..&2,&3)";N2;N3;N4)

=maple("A:=&1";N5)

=maple("G:=map(g->evalf(eval(Fm(x),x=g)),[A])")

=maple("max(abs~(G))")

Someone can help me??

Hello,

 

I tried to plot the problem presented below:

restart; with(plots); C := setcolors(); with(LinearAlgebra);

formula1 := 2.6*BodyWeight*abs(sin(4*Pi*t));
2.6 BodyWeight |sin(4 Pi t)|
BodyWeight := 80*9.81;
plot(formula1, t = 0 .. 2);


eq2 := formula1-SpringConstant*y(t)-DampConstant*(diff(y(t), t)) = Mass*(diff(y(t), `$`(t, 2)));
2040.480 |sin(4 Pi t)| - SpringConstant y(t)

/ d \ / d / d \\
- DampConstant |--- y(t)| = Mass |--- |--- y(t)||
\ dt / \ dt \ dt //
DampConstant := 50;
50
Mass := .200;
Springt := 200;
200
SpringConstant := Youngsmodulus*Surface/DeltaLength;
DeltaLength := 0.2e-1-y(t);
Surface := .15;
Youngsmodulus := 6.5*10^6/(t+1)+6.5*10^6;
plot(Youngsmodulus, t = 0 .. 10000);

eq2;
2040.480 |sin(4 Pi t)|

/ 6 \
|6.5000000 10 6|
0.15 |------------- + 6.5000000 10 | y(t)
\ t + 1 / / d \
- ----------------------------------------- - 50 |--- y(t)| =
0.02 - y(t) \ dt /

/ d / d \\
0.200 |--- |--- y(t)||
\ dt \ dt //

incs := y(0) = 0, (D(y))(0) = 0;
eq4 := dsolve({eq2, incs}, y(t), type = numeric, method = lsode[backfull], maxfun = 0);
proc(x_lsode) ... end;

plots:-odeplot(eq4, [t, y(t)], 0 .. 5);

 When I try to plot it beyond t=5, Maple gives the following error:

Warning, could not obtain numerical solution at all points, plot may be incomplete

Does anyone know how to plot it even further?

 

 

vz := 2*(-eta^2+1);

D_im := .22;

r0 := 1;

pde := diff(vz*Y(eta, z), z)-D_im*((diff(eta*(diff(Y(eta, z), eta)), eta))/eta+diff(Y(eta, z), `$`(z, 2)))/r0 = 0;

pde := expand(%);

ibc := [Y(1, z) = 0, (D[1](Y))(0, z) = 0, Y(eta, 0) = 1, (D[2](Y))(eta, 0) = 0];

sol := pdsolve(pde, ibc, numeric, time = z, range = 0 .. 1);

pds := sol:-value(z = 0, output = listprocedure);

sol:-plot(z = 0.1e-3, numpoints = 50, color = blue, view = 0 .. 1)

So I was trying to solve this conservation equation for the radial coordinate eta and the z coordinate being treated as time. The flow is in z direction. Now unfortunately it is diverging. Not sure why though. What am I doing wrong?

Here is ODE

restart:
with(plots):
Digits:=35:

ini1:=D(x)(0)=0,x(0)=1:
dsys:=diff(x(t),t,t)+(x(t)-2)*diff(x(t),t)+5*x(t)=0;
dsol1 :=dsolve({dsys,ini1},numeric,abserr=1e-9, relerr=1e-8,maxfun=0);
plots:-odeplot(dsol1,[[t,x(t)]],0..20,axes=boxed,color=black,linestyle=1,tickmarks=[6, 6],axes=boxed,titlefont=[SYMBOL,12]);

1-Why when i run for long time>1.5 give me error

2- how to plot phase plot of x'(t) against x(t)

Any comments will be helpful

> restart;
> a := -10; b := 10; ps := seq(plot([i, t, t = -20 .. 20], x = -10 .. 10, y = -20 .. 20, color = red, style = point), i = a .. b);

plots[display](ps, insequence = true); p := plots[display](ps, insequence = true);

 

restart:
with(plots):
y=sin(x);
p:=implicitplot(y=sin(x),x=-10..10,y=-2..2,thickness=4,color=red,scaling=constrained,numpoints=1000):
plots[display](p);

 

y=sin(3*x);
p0:=implicitplot(y=sin(x),x=-10..10,y=-5..5,thickness=3,color=red,scaling=constrained,numpoints=1000,linestyle=2,style=POINT,symbol=CROSS):
p1:=implicitplot(y=sin(3*x),x=-10..10,y=-5..5,thickness=4,color=blue,numpoints=10000):
plots[display](p0,p1);
y=sin(1/3*x);
p11:=implicitplot(y=sin(1/3*x),x=-10..10,y=-5..5,thickness=4,color=navy,numpoints=10000):
plots[display](p0,p11);

 

 

y=2*sin(x);
p2:=implicitplot(y=2*sin(x),x=-10..10,y=-5..5,thickness=4,color=blue,numpoints=10000):
plots[display](p0,p2);
y=1/2*sin(x);
p22:=implicitplot(y=1/2*sin(x),x=-10..10,y=-5..5,thickness=4,color=navy,numpoints=10000):
plots[display](p0,p22);

 

y=2+sin(x);
p3:=implicitplot(y=2+sin(x),x=-10..10,y=-5..5,thickness=4,color=blue,numpoints=10000):
plots[display](p0,p3);
y=sin(x)-2;
p33:=implicitplot(y=sin(x)-2,x=-10..10,y=-5..5,thickness=4,color=navy,numpoints=10000):
plots[display](p0,p33);

y=sin(x+2);
p4:=implicitplot(y=sin(x+2),x=-10..10,y=-5..5,thickness=4,color=blue,numpoints=10000):
plots[display](p0,p4);
y=sin(x-2);
p44:=implicitplot(y=sin(x-2),x=-10..10,y=-5..5,thickness=4,color=navy,numpoints=10000):
plots[display](p0,p44);

y=-sin(x);
p7:=implicitplot(y=-sin(x),x=-10..10,y=-5..5,thickness=4,color=blue,numpoints=10000):
plots[display](p0,p7);
y=sin(-x);
p77:=implicitplot(y=sin(-x),x=-10..10,y=-5..5,thickness=4,color=navy,numpoints=10000):
plots[display](p0,p77);

 

y=abs(sin(x));
p00:=implicitplot(y=sin(x),x=-10..10,y=-5..5,thickness=3,color=red,scaling=constrained,numpoints=1000,linestyle=2,style=POINT,symbol=BOX):
p5:=implicitplot(y=abs(sin(x)),x=-10..10,y=-5..5,thickness=4,color=blue,numpoints=10000):
plots[display](p00,p5);
plots[display](p5,scaling=constrained);

y=sin(abs(x));
p00:=implicitplot(y=sin(x),x=-10..10,y=-5..5,thickness=3,color=red,scaling=constrained,numpoints=1000,linestyle=2,style=POINT,symbol=BOX):
p6:=implicitplot(y=sin(abs(x)),x=-10..10,y=-5..5,thickness=4,color=navy,numpoints=10000):
plots[display](p00,p6);
plots[display](p6,scaling=constrained);

 

 

I am a new user with Maple, and was using it as a documentation. But, can't fully see the file created a day before. 

The file opens but most of the content is gone and gives the error message.

There were problems during the loading process, Your worksheet may become incomplete

Googled a bit yet couldn't solve it :/ 

Is there any way to fix this?

Why_Mcausal_not_helping.mw

 

 

 

 

In plots made with 'complexplot3d', Maple uses by default a color wheel for the argument of complex numbers in which positive numbers are painted cyan and negative numbers are red. Is there a way to change this to the other common convention (i.e. cyan negative and red positive numbers)?

 

Any help would be really appreciated, as it's not convenient to have graphs made with different conventions in the same document and I wouldn't want to remake all the ones I already have.

I am trying to use Maple to discretize a model by solving an integral analytically. In my textbook the problem is solved by using Maple and is according to them "These calculations are quite straightforward to compute with Maple".

In my textbook there is an example where the non-linear system with state vector x(t) = [x1(t), x2(t), v(t), h(t), w(t)]' is described as

dx/dt=[v*cos(h), v*sin(h), 0, w, 0]'=a(x(t)).

To discretize this model the sampling formula x(t+T) = x(t) + int(a(x(tau)), tau=t..t+T) is used

Firstly, we can integrate the expressions row by row, the first row would then be

x1(t+T)=x1(t)+int(v(tau)*cos(h(tau)), tau=t..t+T).

The result when the sampling formula is applied to the first row in the example is

x1(t+T)=x1(t)+2v(t)/w(t)*sin(w(t)T/2)*cos(h(t)+w(t)T/2)

I have tried using int() and dsolve() but have only managed to get results that involve integrals. I would appreciate if someone more experienced could help me with this and maybe shed some light on if it actually is possible to do this?

 

 

First 1092 1093 1094 1095 1096 1097 1098 Last Page 1094 of 2224