Maple 18 Questions and Posts

These are Posts and Questions associated with the product, Maple 18

Dear maple users @acer @Carl Love @Kitonum @Preben Alsholm @dharr @tomleslie

Greeting.

I have solved some PDEs in analytically and numerically.

But the numerical and analytical results are not matching.

I hope there is some problem with an analytical solution, especially in the first order and second-order boundary conditions.

Both the codes have enclosed here, waiting for a reply.

AN.mw

NUM.mw

Note: The PDEs are performed in the Maple 18 version. 

When compiling an analytical solution, in clarify expression click the remember table assignment.

 

Dear colleagues,

 

how can i plot streamlines and isothermes and also 3D graphes of Nussult number and skin friction coefficient for boundary layer flow problem with Maple? 

Regards

Berham.

MagBVP.mw

MagBVP.docx

Trying to get a curve of two data points but the graph is not a curve.

with(Statistics):

``

l1 := plot(X, t = 0 .. 16, thickness = 4, linestyle = dash, color = red):

 

``

Download fitting.mw

## i need to get a curve, but the graph is not displaying a curve fit

 

Dear maple users,

Greetings.

Q1.How to plot a figure for different values of M?

      like M=1,2,3,4:

Code:Mplot.mw

Q2. How to assign all the expressions are "remember table assignment"

Dear Maple Users @acer @Carl Love @Kitonum @Preben Alsholm ,

Greetings.

How to plot a function "Am" for various values of "kt"(eg: kt=-1..1) at a point x=0.

Am vs kt.

The code has provided below.

Waiting for your response.

ktplot.mw

 

Hallo;
the following MAPLE code generates 2-vectors. To collect them into a set K unfortunately does not work. K contains vectors two-fold etc. So K is not a set which I hoped to get. What is wrong?

restart:m:=5;#m Module
with(LinearAlgebra[Modular]):
K:={};
M:=Matrix([[3, 4*168], [4,3]]);
L:=Matrix([[3],[4]]);
#with(LinearAlgebra[Modular]):
for s from 0 to 10 do
a:=Mod(m,(M^s).L,integer);
K:=K union {a};
od:
K:=K;

Gerd

Dear maple users,

Greetings.

How to plot a contour for the below-mentioned function.

f(x):=-0.09465519086 x^3+0.02711194463 x^2+0.3862193003 x-0.00030060626-0.0003613678673 x^6-0.001538973646 x^5-0.01937304057 x^4-3.822344860 10^(-8) x^8-0.000007297718101 x^7

 

How can I generate a code to plot the optimals; h, chi and psi?


 

restart;

with(PDEtools):

with(plot):

Error, invalid input: with expects its 1st argument, pname, to be of type {`module`, package}, but received plot

 

A1:=Matrix([[phi,(chi),conjugate(phi),conjugate(chi)],
          [chi,(phi),conjugate(chi),conjugate(phi)],
          [lambda*phi,-(lambda)*(chi),
           conjugate(lambda)*conjugate(phi),-conjugate(lambda)*conjugate(chi)],
          [lambda*chi,-(lambda)*(phi),
           conjugate(lambda)*conjugate(chi),-conjugate(lambda)*conjugate(phi)]]);

A1 := Matrix(4, 4, {(1, 1) = phi, (1, 2) = chi, (1, 3) = conjugate(phi), (1, 4) = conjugate(chi), (2, 1) = chi, (2, 2) = phi, (2, 3) = conjugate(chi), (2, 4) = conjugate(phi), (3, 1) = lambda*phi, (3, 2) = -lambda*chi, (3, 3) = conjugate(lambda)*conjugate(phi), (3, 4) = -conjugate(lambda)*conjugate(chi), (4, 1) = lambda*chi, (4, 2) = -lambda*phi, (4, 3) = conjugate(lambda)*conjugate(chi), (4, 4) = -conjugate(lambda)*conjugate(phi)})

(1)

d1 := LinearAlgebra:-Determinant(A1):

d1; length(%);

conjugate(lambda)^2*conjugate(phi)^2*chi^2-conjugate(lambda)^2*conjugate(phi)^2*phi^2-conjugate(lambda)^2*conjugate(chi)^2*chi^2+conjugate(lambda)^2*conjugate(chi)^2*phi^2+2*conjugate(lambda)*conjugate(phi)^2*chi^2*lambda+2*conjugate(lambda)*conjugate(phi)^2*lambda*phi^2-8*conjugate(lambda)*conjugate(phi)*conjugate(chi)*chi*lambda*phi+2*conjugate(lambda)*conjugate(chi)^2*chi^2*lambda+2*conjugate(lambda)*conjugate(chi)^2*lambda*phi^2+conjugate(phi)^2*chi^2*lambda^2-conjugate(phi)^2*lambda^2*phi^2-conjugate(chi)^2*chi^2*lambda^2+conjugate(chi)^2*lambda^2*phi^2

 

705

(2)

den:=simplify(d1,size); length(%);

-(-(conjugate(chi)-conjugate(phi))*(chi+phi)*conjugate(lambda)+lambda*(conjugate(chi)+conjugate(phi))*(chi-phi))*(-(conjugate(chi)+conjugate(phi))*(chi-phi)*conjugate(lambda)+lambda*(conjugate(chi)-conjugate(phi))*(chi+phi))

 

333

(3)

 

con1:=phi=exp(I*lambda*(x-t/(4*lambda^2)-w^2)):con2:=chi=exp(-I*lambda*(x-t/(4*lambda^2)-w^2)):

 

den1:=simplify(dsubs({con1,con2},den));

4*conjugate(lambda)^2*cos((1/4)*(4*w^2*lambda^2-4*x*lambda^2+conjugate((4*lambda^2*w^2-4*lambda^2*x+t)/lambda)*lambda+t)/lambda)^2-4*conjugate(lambda)^2*cos((1/4)*(-4*w^2*lambda^2+4*x*lambda^2+conjugate((4*lambda^2*w^2-4*lambda^2*x+t)/lambda)*lambda-t)/lambda)^2+8*conjugate(lambda)*cos((1/4)*(4*w^2*lambda^2-4*x*lambda^2+conjugate((4*lambda^2*w^2-4*lambda^2*x+t)/lambda)*lambda+t)/lambda)^2*lambda+8*conjugate(lambda)*cos((1/4)*(-4*w^2*lambda^2+4*x*lambda^2+conjugate((4*lambda^2*w^2-4*lambda^2*x+t)/lambda)*lambda-t)/lambda)^2*lambda+4*cos((1/4)*(4*w^2*lambda^2-4*x*lambda^2+conjugate((4*lambda^2*w^2-4*lambda^2*x+t)/lambda)*lambda+t)/lambda)^2*lambda^2-4*cos((1/4)*(-4*w^2*lambda^2+4*x*lambda^2+conjugate((4*lambda^2*w^2-4*lambda^2*x+t)/lambda)*lambda-t)/lambda)^2*lambda^2-16*conjugate(lambda)*lambda

(4)

plot3d(subs(Re(lambda)=1, Im(lambda)=.2, w=1, rhs(den1)),x=-6..6, t=-6..6)

Warning, inserted missing semicolon at end of statement

 

Error, invalid input: rhs received 4*conjugate(lambda)^2*cos((1/4)*(4*w^2*lambda^2-4*x*lambda^2+conjugate((4*lambda^2*w^2-4*lambda^2*x+t)/lambda)*lambda+t)/lambda)^2-4*conjugate(lambda)^2*cos((1/4)*(-4*w^2*lambda^2+4*x*lambda^2+conjugate((4*lambda^2*w^2-4*lambda^2*x+t)/lambda)*lambda-t)/lambda)^2+8*conjugate(lambda)*cos((1/4)*(4*w^2*lambda^2-4*x*lambda^2+conjugate((4*lambda^2*w^2-4*lambda^2*x+t)/lambda)*lambda+t)/lambda)^2*lambda+8*conjugate(lambda)*cos((1/4)*(-4*w^2*lambda^2+4*x*lambda^2+conjugate((4*lambda^2*w^2-4*lambda^2*x+t)/lambda)*lambda-t)/lambda)^2*lambda+4*cos((1/4)*(4*w^2*lambda^2-4*x*lambda^2+conjugate((4*lambda^2*w^2-4*lambda^2*...

 

NULL

``

 

``


 

Download 23May(1).mw


 

``

lambda := .3:

omega := lambda+mu+xi:

alpha := 2*sqrt(lambda*mu)

.9165151390

(1)

``

B[1] := BesselI(k-1, alpha*(u-y))

BesselI(k-1, .9165151390-.9165151390*y)

(2)

B[2] := BesselI(k+1, alpha*(u-y))

BesselI(k+1, .9165151390-.9165151390*y)

(3)

``

F := evalf(Int(sum((B[1]-B[2])*exp(-omega*(u-y)), k = 1 .. infinity), y = 0 .. u))

Int(sum((BesselI(k-1., .9165151390-.9165151390*y)-1.*BesselI(k+1., .9165151390-.9165151390*y))*exp(-1.200000000+1.200000000*y), k = 1 .. infinity), y = 0. .. 1.)

(4)

``

``

``


 

Download int.mw

> den := -(-(conjugate(chi)-conjugate(phi))*(chi+phi)*conjugate(lambda)+lambda*(conjugate(chi)+conjugate(phi))*(chi-phi))*(-(conjugate(chi)+conjugate(phi))*(chi-phi)*conjugate(lambda)+lambda*(conjugate(chi)-conjugate(phi))*(chi+phi));

> phi:=exp(I*lambda*(x-t/(4*lambda^2)-w^2)):chi:=exp(-I*lambda*(x-t/(4*lambda^2)-w^2)):

> den1:=simplify(dsubs({phi,chi},den));

> dsubs({exp((1/4*I)*(4*lambda^2*w^2-4*lambda^2*x+t)/lambda), exp(-(1/4*I)*(4*lambda^2*w^2-4*lambda^2*x+t)/lambda)}, 4*conjugate(lambda)^2*cos((1/4)*(4*w^2*lambda^2-4*x*lambda^2+conjugate((4*lambda^2*w^2-4*lambda^2*x+t)/lambda)*lambda+t)/lambda)^2-4*conjugate(lambda)^2*cos((1/4)*(-4*w^2*lambda^2+4*x*lambda^2+conjugate((4*lambda^2*w^2-4*lambda^2*x+t)/lambda)*lambda-t)/lambda)^2+8*abs(lambda)^2*cos((1/4)*(4*w^2*lambda^2-4*x*lambda^2+conjugate((4*lambda^2*w^2-4*lambda^2*x+t)/lambda)*lambda+t)/lambda)^2+8*abs(lambda)^2*cos((1/4)*(-4*w^2*lambda^2+4*x*lambda^2+conjugate((4*lambda^2*w^2-4*lambda^2*x+t)/lambda)*lambda-t)/lambda)^2+4*cos((1/4)*(4*w^2*lambda^2-4*x*lambda^2+conjugate((4*lambda^2*w^2-4*lambda^2*x+t)/lambda)*lambda+t)/lambda)^2*lambda^2-4*cos((1/4)*(-4*w^2*lambda^2+4*x*lambda^2+conjugate((4*lambda^2*w^2-4*lambda^2*x+t)/lambda)*lambda-t)/lambda)^2*lambda^2-16*abs(lambda)^2)

 

Since "cos(...)" appears in every term in last equation (except a last one), how to common it? 


 

``

restart:

with(PDEtools):

with(LinearAlgebra):

 

alias(f=f(x,t),g=g(x,t));

f, g

(1)

 

 

eq1:=diff(f,x)=-I*eta*f +I*exp(-I*t)*g;

diff(f, x) = -I*eta*f+I*exp(-I*t)*g

(2)

eq2:=diff(g,x)=-I*eta*g +I*exp(I*t)*f;

diff(g, x) = -I*eta*g+I*exp(I*t)*f

(3)

eq3:=diff(f,t)=(I*eta^2-I/2)*f +I*eta*exp(-I*t)*g;

diff(f, t) = (I*eta^2-(1/2)*I)*f+I*eta*exp(-I*t)*g

(4)

eq4:=diff(g,t)=(-I*eta^2+I/2)*g +I*eta*exp(I*t)*f;

diff(g, t) = (-I*eta^2+(1/2)*I)*g+I*eta*exp(I*t)*f

(5)

#### The solution of (2)-(5) is

eq5:=f=I*(c1*exp(A)-c2*exp(-A))*exp(-i*t/2);

f = I*(exp(A)*c1-c2*exp(-A))*exp(-(1/2)*i*t)

(6)

eq6:=g=(c2*exp(A)-c1*exp(-A))*exp(i*t/2);

g = (c2*exp(A)-c1*exp(-A))*exp((1/2)*i*t)

(7)

#### where

c1=sqrt(h-sqrt(h^2-1))/sqrt(h^2-1);c2=sqrt(h+sqrt(h^2-1))/sqrt(h^2-1);A=sqrt(h^2-1)*(x+I*h*t);

c1 = (h-(h^2-1)^(1/2))^(1/2)/(h^2-1)^(1/2)

 

c2 = (h+(h^2-1)^(1/2))^(1/2)/(h^2-1)^(1/2)

 

A = (h^2-1)^(1/2)*(x+I*h*t)

(8)

#### How to verify (6) and (7) is the solution of (2)-(5)?

``


 

Download verification.mw

Dear all

I want if possible to solve the inequation   f(x,y)>0 using maple

positive_function.mw

Thanks for any help

 

Dear maple users,

Greetings.

How to plot this function equation "An" for x=0.0001..1,0.02 with 0..1 range.

Wating for replay.

restart;
A2 := 1.107444364; A4 := 1.124502164; ad := .5; ed := 0.1e-1; pd := 21; ld := .3;
f := unapply(3*x^2-2*x^3-1.238616691*x^2*(x-1)^2-.7382714588*x^2*(x-1)^3+.1921034396*x^2*(x-1)^4+.5253305667*x^2*(x-1)^5+.7364291997*x^2*(x-1)^6+1.032724351*x^2*(x-1)^7+.8058204155*x^2*(x-1)^8+.3290860035*x^2*(x-1)^9, x);
t := unapply(.339997432+1.547096375*x^2-2.488736512*x^3+8.154594212*x^4-15.63643668*x^5+15.85832377*x^6-8.734300202*x^7+1.959461605*x^8, x);
b1 := f(x);
b2 := diff(f(x), x);
b3 := diff(f(x), x, x);
b4 := t(x);
b5 := diff(t(x), x);
An := A4*(1+(4/3)*ad)*(b5^2+b4^2/ld^2)+4*ed*pd*(b2^2/x^2+b1^2/x^4-b1*b2/x^3)/ld;
As := seq(An, x = 0.1e-2 .. 1, 0.5e-1);
L := [seq([x, As], x = 0.1e-2 .. 1, 0.5e-1)];

with(plots);
plots:-display(plot(L, style = point), plot(As, x = 0.1e-2 .. 1), color = blue, linestyle = solid, labels = ["η", "f'"], thickness = 1, labeldirections = [horizontal, vertical], labelfont = ['TIMES', 'BOLDOBLIQUE', 16], size = [450, 450], axes = box);
mp.mw
 

restart

A2 := 1.107444364:

f := unapply(3*x^2-2*x^3-1.238616691*x^2*(x-1)^2-.7382714588*x^2*(x-1)^3+.1921034396*x^2*(x-1)^4+.5253305667*x^2*(x-1)^5+.7364291997*x^2*(x-1)^6+1.032724351*x^2*(x-1)^7+.8058204155*x^2*(x-1)^8+.3290860035*x^2*(x-1)^9, x):

t := unapply(.339997432+1.547096375*x^2-2.488736512*x^3+8.154594212*x^4-15.63643668*x^5+15.85832377*x^6-8.734300202*x^7+1.959461605*x^8, x):

b1 := f(x):

b2 := diff(f(x), x):

b3 := diff(f(x), x, x):

b4 := t(x):

b5 := diff(t(x), x):

An := A4*(1+(4/3)*ad)*(b5^2+b4^2/ld^2)+4*ed*pd*(b2^2/x^2+b1^2/x^4-b1*b2/x^3)/ld:

As := seq(An, x = 0.1e-2 .. 1, 0.5e-1):

L := [seq([x, As], x = 0.1e-2 .. 1, 0.5e-1)]:

``

with(plots):

plots:-display(plot(L, style = point), plot(As, x = 0.1e-2 .. 1), color = blue, linestyle = solid, labels = ["η", "f'"], thickness = 1, labeldirections = [horizontal, vertical], labelfont = ['TIMES', 'BOLDOBLIQUE', 16], size = [450, 450], axes = box)

Error, (in plot) found points with fewer or more than 2 components

 

``


 

Download mp.mw

 

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