Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

with(plots); R1 := .1; R0 := .1; m := .1; a := .1; Ha := .1; Nt := .1; Nb := .1; Pr := 6.2; Le := .6; Bi := 1; Ec := .1; k := 1; r := .1; A := 1; fcns := {C(y), T(y), U(y), W(y)}; sys := diff(U(y), `$`(y, 2))+(R1*(diff(U(y), y))-2*R0*W(y))*exp(a*T(y))-a*(diff(U(y), y))*(diff(T(y), y))-Ha*(U(y)+m*W(y))*exp(a*T(y))/(m^2+1)-U(y)/k+A*exp(a*T(y)) = 0, diff(W(y), `$`(y, 2))+(R1*(diff(W(y), y))+2*R0*U(y))*exp(a*T(y))-a*(diff(W(y), y))*(diff(T(y), y))-Ha*(W(y)-m*U(y))*exp(a*T(y))/(m^2+1)-W(y)/k = 0, diff(T(y), `$`(y, 2))+R1*Pr*(diff(T(y), y))+Pr*Ec*exp(-a*T(y))*((diff(U(y), y))*(diff(U(y), y))+(diff(W(y), y))*(diff(W(y), y)))+Nt*(diff(T(y), y))*(diff(T(y), y))+Pr*Ec*(U(y)*U(y)+W(y)*W(y))*exp(-a*T(y))/k = 0, diff(C(y), `$`(y, 2))+Pr*Le*R1*(diff(C(y), y))+Nt*(diff(C(y), `$`(y, 2)))/Nb-r*C(y) = 0; bc := U(0) = 0, W(0) = 0, C(0) = 0, (D(T))(0) = Bi*(T(0)-1), U(1) = 0, W(1) = 0, C(1) = 1, T(1) = 0; L := [.5, 1.0, 1.5, 2.0]; AP := NULL; for k to 4 do R := dsolve(eval({bc, sys}, Ha = L[k]), fcns, type = numeric, method = bvp[midrich], AP); AP := approxsoln = R; p1u[k] := odeplot(R, [y, U(y)], 0 .. 1, numpoints = 100, labels = ["y", "U"], linestyle = dash, color = black) end do; display({p1u[1], p1u[2], p1u[3], p1u[4]})

for small value of k no change show in plot... the resulted value is so small and the system consider it zero and show no change in plot.. then how to get the change in plot to change in k... ??? plz suggest 


 

restart; Digits := 5; with(plots); with(LinearAlgebra)

a := 0:

0.11976e-3*k

(1)

for i from 0 while i <= N do u[i, 0] := h*i+1 end do:

for j from 0 while j <= N+1 do u[0, j] := .1; u[N+1, j] := .5 end do:

printlevel := 2:

NULL

NULL

sys := ([seq])(seq(eq[i, j], j = 0 .. N), i = 1 .. N):

nops(sys);

vars:=indets(sys) minus {k}:

nn := Matrix(N+1, N+1,(i, j)-> u[i-1, j-1]):

##

p:=proc(kk) local u_res,A;

  u_res:=solve(eval(sys,k=kk),vars);

  A:=eval(nn,u_res);

  plots:-matrixplot(A)

end proc;

## Testing p for k=0.001:

p(0.001);

## Animating the plot for k=0.0001..0.001:

plots:-animate(p,[k],k=0.0001..0.001);

 

90

 

proc (kk) local u_res, A; u_res := solve(eval(sys, k = kk), vars); A := eval(nn, u_res); plots:-matrixplot(A) end proc

 

 

 

 

``


 

Download Crank_scheme_4.mw
 

restart; Digits := 5; with(plots); with(LinearAlgebra)

a := 0:

0.11976e-3*k

(1)

for i from 0 while i <= N do u[i, 0] := h*i+1 end do:

for j from 0 while j <= N+1 do u[0, j] := .1; u[N+1, j] := .5 end do:

printlevel := 2:

NULL

NULL

sys := ([seq])(seq(eq[i, j], j = 0 .. N), i = 1 .. N):

nops(sys);

vars:=indets(sys) minus {k}:

nn := Matrix(N+1, N+1,(i, j)-> u[i-1, j-1]):

##

p:=proc(kk) local u_res,A;

  u_res:=solve(eval(sys,k=kk),vars);

  A:=eval(nn,u_res);

  plots:-matrixplot(A)

end proc;

## Testing p for k=0.001:

p(0.001);

## Animating the plot for k=0.0001..0.001:

plots:-animate(p,[k],k=0.0001..0.001);

 

90

 

proc (kk) local u_res, A; u_res := solve(eval(sys, k = kk), vars); A := eval(nn, u_res); plots:-matrixplot(A) end proc

 

 

 

 

``


 

Download Crank_scheme_4.mw

 

Dear all, I had a challenge of using maple to obtain numerical solution of a volterra-integral equation using the method of reproducing kernel space, however I converted the integral equation to an ode and try to solve it numerically but obtatined an error message. Please how do I overcome it? the problem is as follows:

dsn := dsolve({diff(u(x), x) = e^x*ln(e)+(2/9)*e^3-1/9+int(y*u(y)^3, y = 0 .. 1), u(0) = 1}, numeric)

Here in my code I am trying to differentiate a finite summation and the command Sum is giving me a simpler evaluation than the command sum.

But I have a problem, the command Sum doesn't work under signal processing tool. Is there away to make it work?

 

 

For some unknown reason, the code below does not work in Maple 2018.1, but works in Maple 2015 and Maple 2017 (the idea is taken from here

restart; 
with(plottools): with(plots):
V1,V2,V3,V4,V5,V6,V7,V8:=[0,-1,0],[0,0,0],[1,0,0],[1,-1,0],[0,-1,1],[0,0,1],[1,0,1],[1,-1,1]:  # The vertices of the cube
Faces:=[[V1,V4,V8,V5],[V5,V6,V7,V8],[V2,V3,V7,V6],[V1,V2,V3,V4],[V3,V4,V8,V7],[V1,V2,V6,V5]]: # The list of the faces
Colors:=[green, red,RGB(1, 0, 4),blue,grey,gold]: # The list of the colors
Cube[0]:=display([seq(polygon(Faces[i],color=Colors[i]),i=1..6)]):

for n from 1 to 7 do
F[n]:=t->rotate(Cube[n-1],t, [[0,n-1,0],[1,n-1,0]]):
Cube[n]:=rotate(Cube[n-1],-Pi/2, [[0,n-1,0],[1,n-1,0]]):
A[n]:=animate(display,[F[n](t)], t=0..-Pi/2,paraminfo=false);
od:

for m from 6 to 0 by -1 do
G[m]:=t->rotate(Cube[m+1],t, [[0,m,0],[1,m,0]]):
B[m]:=animate(display,[G[m](t)], t=0..Pi/2,paraminfo=false);
od:

C1:=display([seq(A[k], k=1..7)], insequence):
C2:=display([seq(B[k], k=6..0, -1)], insequence):
display([C1,C2], insequence, scaling=constrained, axes=normal);

 

I currently have a procedure that runs a fairly complicated formula involving non-commutative variables. The procedure is Vu(a, b, c) where a, b, and c are any integers. I have to run this formula whenever vacub appears in my expression. I'm currently replacing each variable of this type with the procedure Vu(a, b, c). I'm wanted to automate that process if possible. One thought I had was to assign the value of Vu(a, b, c) to the variable vacub for any value of a, b, and c from 1 to 5. Then use the eval command to replace the variables with the proper values. Is there any way to automate this process? Let me give you an example:

v0u0 = u0v0 + 2w0

So u0v0u0 = u0(u0v0+2w0) = u02v0+2u0w0

I have a procedure to truncate algebraic equations. Found the basic answer hrere. I would like to make it handle equations and functions i.e f:=a x^2 +b y... and f(x,y):=c x y^2.... I can make it handle the first type but not the second.

restart

``

NULL

NULL

Trunc := proc (eq, odr := 2, v::list := [x, y, z]) local a, b, q; description " Truncates an algebraic equation to required degree"; a := eq; b := v; map(select, proc (q) options operator, arrow; evalb(degree(q, b) <= odr) end proc, a) end proc

proc (eq, odr := 2, v::list := [x, y, z]) local a, b, q; description " Truncates an algebraic equation to required degree"; a := eq; b := v; map(select, proc (q) options operator, arrow; evalb(degree(q, b) <= odr) end proc, a) end proc

(1)

"E1(x,y,z):=2+3 x-y+5 x^(2)y+4 x y+x y^(3)+3 a^(2)+z+z^(2)"

proc (x, y, z) options operator, arrow, function_assign; 2+3*x-y+5*x^2*y+4*y*x+x*y^3+3*a^2+z+z^2 end proc

(2)

Trunc(E1, 2, [x, y, z])

E1

(3)

``

E2 := E1(x, y, z)

x*y^3+5*x^2*y+3*a^2+4*x*y+z^2+3*x-y+z+2

(4)

Trunc(E2, 1, [x, y])

3*a^2+z^2+3*x-y+z+2

(5)

Trunc(E2, 1, [x, y, z])

3*a^2+3*x-y+z+2

(6)

``whattype(E1(x, y, z))

`+`

(7)

whattype(E2)

`+`

(8)

``


 

Download Truncate.mw

Could anyone tell me why Maple changes the sign of some expressions? For example...

I would like the outputs to be that way.

sqrt(r/(r-b))

How to prevent this changes?

Thanks in advance,

 

Denis

How to linearize this complex dynamical system around x1(t)=0, x2(t)=0, x3(t)=0. Basically i want to keep nonlinear part up to fifth order on the right hand side and later want to drop it. How can i do it. The maplesheet Dyn_system.mw is attached.

Many thanks in advance.

How can I generate a sequence of random numbers Xi and Yi in [-1,1] ?

 

Why I couln't receive the value of Wn[0, 0, 1] in the following loop?

Download sual.mw

 

> restart;

>for n from 1 to 3 do

Wn[0 .. 1, 0 .. 1, n] := n*ArrayTools:-Alias(Matrix(2, 2, [[3, 1], [1, 3]]), [0 .. 1, 0 .. 1])

end do:
>Wn[0, 0, 1];

Wn[0, 0, 1]

 

We produce only one rotation of the cube by the angle Pi/2, and then repeat it at the following points, changing the colors of the faces in turn. And so the illusion is created that the cube is rolling along a straight line without slipping.
(Just a picture without any sense.) cube_without_slipping.mw

Hello

I want to compute integral with Maple,but returns unevaluated for me.

int((-5*ln(x)^4*Pi^4-20*ln(x)^2*Pi^4-8*Pi^4+120*MeijerG([[0, 0], [1, 1, 1]], [[0, 0, 0, 0, 0], []], x^Pi))/(120*Pi^4*(-1+x)^2), x = 4/10 .. 6/10, numeric);

# ???

Thanks.

1 2 3 4 5 6 7 Last Page 1 of 1446