MaplePrimes Questions

 

 

Hello there..I tried to plot this program n somehow it didnt work.. I dont know how to fix it (I'm a beginner user)..Can anyone help me?? Please..

Thanks a lot

--------------------------------------------------

hmin := .2;

tclose := 150;

topen := 120;

B0 := 0; B1 := 800; dB := (B1-B0)*(1/100);

B := dB*i+B0;

xcoor := [seq(B, i = 0 .. 99)];

ycoor := [seq(fsolve(tclose*ln((1-(1-hmin)*exp((-B+APD)/topen))/hmin) = APD), i = 0 .. 99)];

with(plots);

P := plot(xcoor, ycoor);

display(P)

restart;
odes:=diff(x1(t),t)*diff(x2(t),t$2)*sin(x1(t)*x2(t))+5*diff(x1(t),t$2)*diff(x2(t),t)*cos(x1(t)^2)+t^2*x1(t)*x2(t)^2=exp(-x2(t)^2),diff(x1(t),t$2)*x2(t)+diff(x2(t),t$2)*diff(x1(t),t)*sin(x1(t)^2)+cos(diff(x2(t),t$2)*x2(t))=sin(t);
ics:=x1(0)=1,D(x1)(0)=1,x2(0)=2,D(x2)(0)=2;
subs(diff(x1(t),t$2)=yp2,diff(x2(t),t$2)=yp4,diff(x1(t),t)=Y[2],diff(x2(t),t)=Y[4],x1(t)=Y[1],x2(t)=Y[3],{odes});
p:=proc(N,t,Y,YP)
local eqs,yp2,yp4;
YP[1]=Y[2];
YP[3]=Y[4];
eqs:=[yp2*Y[3]+yp4*Y[2]*sin(Y[1]^2)+cos(yp4*Y[3]) = sin(t), Y[2]*yp4*sin(Y[1]*Y[3])+5*yp2*Y[4]*cos(Y[1]^2)+t^2*Y[1]*Y[3]^2 = exp(-Y[3]^2)];
YP[2],YP[4]:=op(subs(fsolve(eqs,{yp2=1,yp4=2}),[yp2,yp4]));
end proc:
res:=dsolve(numeric,procedure=p,initial=array([1,1,2,2]),number=4,procvars=[x1(t),diff(x1(t),t),x2(t),diff(x2(t),t)],start=0,maxfun=0);
plots:-odeplot(res,[t,x1(t)],0..5,gridlines=true);

It's a long time to wait for the odeplot.

Any advice is appreciated.

How do I iterate starting from a given value. For example, I want to iterate a function F(x) evalf(solve(F(x)=-38)) so that the next value that F(x) uses is the solution to the previous?

Is there a way to convert this FDTD code into Maple

Hy(1 to M)=0;

Ex(1 to M+1)=0;

For t=1 to T,

Ex(1)=exp(-t);

For k=1 to M,

Hy(k)=Hy(k)-(Ex(k+1)-Ex(k));

end

For k=2 to M,

Ex(k)=Ex(k)-(Hy(k)-Hy(k-1));

end

end

Thanks in advance.

Hello, 

I want to solve and plot a multitime recurrence of the Samuelson Hicks Model (http://www.mathem.pub.ro/proc/bsgp-22/K22-gh-A84.pdf).

Feel free to share any tips that could help.

Thank you. 

hello every one

i need to solve this equation

> A1 := Matrix([[a11, a12, a13], [a12, a22, a23], [a13, a23, a33]]);
> A2 := Matrix([[A], [B], [C]]);
> A3 := Matrix([[15], [0], [0]]);
> eq := multiply(A1, A2)=A3;

> solve(eq, {A, B, C});

thank you :)

Hi, I'm tying to solve the ODE by variational iteration method, programme is running, but maple answer does'nt  match to origional answer, plz tell me the mistake?

ICs y(0)=y'(0)=y''(0)=1

VIM_2.mw

Hello everyone, 

In Maple8, I tried to plot this logistic map and an error occured (Error, (in Bifurcation) `plots` does not evaluate to a module).

What is wrong into this code?

Thank you

 

restart: with(plots):Warning, the name changecoords has been redefined

> Bifurcation := proc(initialpoint,xexpr,ra,rb,acc)
> local p1,hr,A,L1,i,j,phi:
> global r,L2:
> hr := unapply(xexpr,x);
> A := Vector(600):
> L1 := Vector(acc*500):
> for j from 1 to acc+1 do
> r := (ra + (j-1)*(rb-ra)/acc):
> A[1] := hr(initialpoint):
> for i from 2 to 500 do
> A[i] := evalf(hr(A[i-1])):
> end do:
> for i from 1 to 400 do
> L1[i+400*(j-1)] := [r,A[i+100]]:
> end do:
> end do:
> L2 := {seq(L1[i], i = 1..acc*400)}:
> p1 := plots:-pointplot(L2, 'symbol' = solidcircle, 'symbolsize' = 8, 'color' = blue):
> unassign('r'):
> return(p1):
> end proc:
> P1:= Bifurcation(1/2,r*x*(1-x),2.5,4,250):
>
Error, (in Bifurcation) `plots` does not evaluate to a module

 

Hello everyone!

 

Do you have any idea to solve and plot a 2-time logistic map:

x(t+ 1_\alpha)= r*x(t)*(1-x(t))  ,t=(t^1,t^2)  ?

 

Thank you

 

 

 

I want to reduce all solution of the equation sin(x)^2=1/4

restart:
sol:=solve(sin(x)^2=1/4, x, AllSolutions);

and

restart:
k:=combine((sin(x))^2);
sol:=solve(k=1/4, x, AllSolutions = true, explicit);
simplify(sol);

How can I reduce solution sol := -1/3*Pi*_B3+1/6*Pi+Pi*_Z3 ?

How can I get x= pi/6+k*pi and x= -pi/6+k*pi?

In Maple 11 we have:

> A := <a,b,c>:
> a := 1:  b := 2: c := 3:
> convert(A, list);
                                   [1, 2, 3]

In Maple 2015 we have:

> A := <a,b,c>:
> a := 1:  b := 2: c := 3:
> convert(A, list);
                                   [a, b, c]

Is that change really intended?

There are no examples for ModuleDeconstruct either on its help page or in the Programming Guide. Of course, I can figure out its basic and primarily intended purpose: to render the module/object in a one-dimensional plaintext printed form, which would be useful for debugging. But I am most interested in this use described in the second sentence of this, the second paragraph of Description at ?ModuleDeconstruct [italics added]:

When the value returned by ModuleDeconstruct is printed, the output could be capable of being parsed to the original module. When used with an object, ModuleDeconstruct can return an unevaluated call to a constructor to achieve this.

That seems very powerful. Is there any example of it being used in Maple library code? in user code? Can anyone here come up with a practical use for this? A Google search turns up nothing.

Hi all,

restart;#part1
epsilon:=5:Delta1:=2:Delta2:=-4: N1:=1000:
dsys :={diff(x(t),t)=-I*Delta1*x(t)+y(t)+epsilon, diff(y(t),t)=-I*Delta2*y(t)+x(t)*z(t), diff(z(t),t)=-2*(conjugate(x(t))*y(t)+conjugate(y(t))*x(t))};

res:=dsolve(dsys union {x(0)=2*I,y(0)=0,z(0)=1},numeric,output=listprocedure);

P1:=plots:-odeplot(res,[[t,Im(y(t))],[t,Re(x(t))]],0..2):

/ d
{ --- x(t) = -2 I x(t) + y(t) + 5,
\ dt

d
--- y(t) = 4 I y(t) + x(t) z(t),
dt

d ____ ____ \
--- z(t) = -2 x(t) y(t) - 2 y(t) x(t) }
dt /
tit:=sprintf("D1=%g,D2=%g",Delta1,Delta2);
"D1=2,D2=-4"
plots[odeplot](res,[[t,Im(y(t))]],0..200,axes=boxed,titlefont=[SYMBOL,14],font=[1,1,18],color=black,linestyle=1,tickmarks=[3, 4],font=[1,1,14],thickness=2,titlefont=[SYMBOL,12]);
Warning, cannot evaluate the solution further right of 90.013890, maxfun limit exceeded (see ?dsolve,maxfun for details)

when I increase the time give this msn:

Warning, cannot evaluate the solution further right of 90.013890, maxfun limit exceeded (see ?dsolve,maxfun for details)

Hello,

Today I've playied a bit with CellDecomposition from the RootFinding package and for one of the systems with which I've playied I got an error which seems to me to be a bug related.

In particular, 

with(RootFinding[Parametric]):

m := CellDecomposition([x^3-y^2 = 0, x^2+y^2-1 < 0], [x, y])

Error, (in RootFinding:-Parametric:-CellDecomposition) Segmentation Violation occurred in external routine

 

Did I make a mistake somewhere or Maple 2015.1 faild?

First 1244 1245 1246 1247 1248 1249 1250 Last Page 1246 of 2429