Maple Questions and Posts Maple Questions and Posts Feed

These are Posts and Questions associated with the product, Maple

Hi everyone. I'm going to solve a problem of an article with hpm. well I wrote some initial codes(I uploaded both codes and article). but now I face with a problem. I cant reach to the correct plot that is in the article. could you please help me???

(dont think I am lazy ;))) I found f and g (by make a system with A1 and B1 and solve it i found f[0] and g[0], with p^3 coefficient in A-->f[1] and then with B2 I foud g[1]) and their plot was correct. but the problem is theta and phi and their plots :(( )

Project.mw

2.pdf   this is article



 

restart;

lambda:=0.5;K[r]:=0.5;Sc:=0.5;Nb:=0.1;Nt:=0.1;Pr:=10;

.5

 

.5

 

.5

 

.1

 

.1

 

10

(1)

EQUATIONS

equ1:=diff(f(eta),eta$4)-R*(diff(f(eta),eta)*diff(f(eta),eta$2)-f(eta)*diff(f(eta),eta$2))-2*K[r]*diff(g(eta),eta)=0;

equ2:=diff(g(eta),eta$2)-R*(diff(f(eta),eta)*g(eta)-f(eta)*diff(g(eta),eta))+2*K[r]*diff(f(eta),eta)=0;

equ3:=diff(theta(eta),eta$2)+Pr*R*f(eta)*diff(theta(eta),eta)+Nb*diff(phi(eta),eta)*diff(theta(eta),eta)+Nt*diff(theta(eta),eta)^2=0;

equ4:=diff(phi(eta),eta$2)+R*Sc*f(eta)*diff(phi(eta),eta)+diff(theta(eta),eta$2)*(Nt/Nb)=0;

diff(diff(diff(diff(f(eta), eta), eta), eta), eta)-R*((diff(f(eta), eta))*(diff(diff(f(eta), eta), eta))-f(eta)*(diff(diff(f(eta), eta), eta)))-1.0*(diff(g(eta), eta)) = 0

 

diff(diff(g(eta), eta), eta)-R*((diff(f(eta), eta))*g(eta)-f(eta)*(diff(g(eta), eta)))+1.0*(diff(f(eta), eta)) = 0

 

diff(diff(theta(eta), eta), eta)+10*R*f(eta)*(diff(theta(eta), eta))+.1*(diff(phi(eta), eta))*(diff(theta(eta), eta))+.1*(diff(theta(eta), eta))^2 = 0

 

diff(diff(phi(eta), eta), eta)+.5*R*f(eta)*(diff(phi(eta), eta))+1.000000000*(diff(diff(theta(eta), eta), eta)) = 0

(2)

BOUNDARY*CONDITIONS

ics:=
f(0)=0,D(f)(0)=1,g(0)=0,theta(0)=1,phi(0)=1;
f(1)=lambda,D(f)(1)=0,g(1)=0,theta(1)=0,phi(1)=0;

f(0) = 0, (D(f))(0) = 1, g(0) = 0, theta(0) = 1, phi(0) = 1

 

f(1) = .5, (D(f))(1) = 0, g(1) = 0, theta(1) = 0, phi(1) = 0

(3)

HPMs

hpm1:=(1-p)*(diff(f(eta),eta$4)-2*K[r]*diff(g(eta),eta))+p*(diff(f(eta),eta$4)-R*(diff(f(eta),eta)*diff(f(eta),eta$2)-f(eta)*diff(f(eta),eta$2))-2*K[r]*diff(g(eta),eta))=0;

hpm2:=(1-p)*(diff(g(eta),eta$2)+2*K[r]*diff(f(eta),eta))+p*(diff(g(eta),eta$2)-R*(diff(f(eta),eta)*g(eta)-f(eta)*diff(g(eta),eta))+2*K[r]*diff(f(eta),eta))=0;

hpm3:=(1-p)*(diff(theta(eta),eta$2))+p*(diff(theta(eta),eta$2)+Pr*R*f(eta)*diff(theta(eta),eta)+Nb*diff(phi(eta),eta)*diff(theta(eta),eta)+Nt*diff(theta(eta),eta)^2)=0;

hpm4:=(1-p)*(diff(phi(eta),eta$2)+diff(theta(eta),eta$2)*(Nt/Nb))+p*(diff(phi(eta),eta$2)+R*Sc*f(eta)*diff(phi(eta),eta)+diff(theta(eta),eta$2)*(Nt/Nb))=0;

(1-p)*(diff(diff(diff(diff(f(eta), eta), eta), eta), eta)-1.0*(diff(g(eta), eta)))+p*(diff(diff(diff(diff(f(eta), eta), eta), eta), eta)-R*((diff(f(eta), eta))*(diff(diff(f(eta), eta), eta))-f(eta)*(diff(diff(f(eta), eta), eta)))-1.0*(diff(g(eta), eta))) = 0

 

(1-p)*(diff(diff(g(eta), eta), eta)+1.0*(diff(f(eta), eta)))+p*(diff(diff(g(eta), eta), eta)-R*((diff(f(eta), eta))*g(eta)-f(eta)*(diff(g(eta), eta)))+1.0*(diff(f(eta), eta))) = 0

 

(1-p)*(diff(diff(theta(eta), eta), eta))+p*(diff(diff(theta(eta), eta), eta)+10*R*f(eta)*(diff(theta(eta), eta))+.1*(diff(phi(eta), eta))*(diff(theta(eta), eta))+.1*(diff(theta(eta), eta))^2) = 0

 

(1-p)*(diff(diff(phi(eta), eta), eta)+1.000000000*(diff(diff(theta(eta), eta), eta)))+p*(diff(diff(phi(eta), eta), eta)+.5*R*f(eta)*(diff(phi(eta), eta))+1.000000000*(diff(diff(theta(eta), eta), eta))) = 0

(4)

f(eta)=sum(f[i](eta)*p^i,i=0..1);

f(eta) = f[0](eta)+f[1](eta)*p

(5)

g(eta)=sum(g[i](eta)*p^i,i=0..1);

g(eta) = g[0](eta)+g[1](eta)*p

(6)

theta(eta)=sum(theta[i](eta)*p^i,i=0..1);

theta(eta) = theta[0](eta)+theta[1](eta)*p

(7)

phi(eta)=sum(phi[i](eta)*p^i,i=0..1);

phi(eta) = phi[0](eta)+phi[1](eta)*p

(8)

FORequ1

A:=collect(expand(subs(f(eta)=f[0](eta)+f[1](eta)*p,g(eta)=g[0](eta)+g[1](eta)*p,hpm1)),p);

(-1.*R*(diff(f[1](eta), eta))*(diff(diff(f[1](eta), eta), eta))+R*f[1](eta)*(diff(diff(f[1](eta), eta), eta)))*p^3+(-1.*R*(diff(f[0](eta), eta))*(diff(diff(f[1](eta), eta), eta))-1.*R*(diff(f[1](eta), eta))*(diff(diff(f[0](eta), eta), eta))+R*f[0](eta)*(diff(diff(f[1](eta), eta), eta))+R*f[1](eta)*(diff(diff(f[0](eta), eta), eta)))*p^2+(diff(diff(diff(diff(f[1](eta), eta), eta), eta), eta)-1.0*(diff(g[1](eta), eta))-1.*R*(diff(f[0](eta), eta))*(diff(diff(f[0](eta), eta), eta))+R*f[0](eta)*(diff(diff(f[0](eta), eta), eta)))*p+diff(diff(diff(diff(f[0](eta), eta), eta), eta), eta)-1.0*(diff(g[0](eta), eta)) = 0

(9)

A1:=diff(f[0](eta),eta$4)-2*K[r]*(diff(g[0](eta),eta))=0;
A2:=diff(f[1](eta),eta$4)-2*K[r]*(diff(g[1](eta),eta))-R*(diff(f[0](eta),eta))*(diff(f[0](eta),eta$2))+R*f[0](eta)*(diff(f[0](eta),eta$2))=0;

diff(diff(diff(diff(f[0](eta), eta), eta), eta), eta)-1.0*(diff(g[0](eta), eta)) = 0

 

diff(diff(diff(diff(f[1](eta), eta), eta), eta), eta)-1.0*(diff(g[1](eta), eta))-R*(diff(f[0](eta), eta))*(diff(diff(f[0](eta), eta), eta))+R*f[0](eta)*(diff(diff(f[0](eta), eta), eta)) = 0

(10)

icsA1:=f[0](0)=0,D(f[0])(0)=1,g[0](0)=0,f[0](1)=lambda,D(f[0])(1)=0,g[0](1)=0;
icsA2:=f[1](0)=0,D(f[1])(0)=0,g[1](0)=0,f[1](1)=0,D(f[1])(1)=0,g[1](1)=0;

f[0](0) = 0, (D(f[0]))(0) = 1, g[0](0) = 0, f[0](1) = .5, (D(f[0]))(1) = 0, g[0](1) = 0

 

f[1](0) = 0, (D(f[1]))(0) = 0, g[1](0) = 0, f[1](1) = 0, (D(f[1]))(1) = 0, g[1](1) = 0

(11)

NULLFORequ2

B:=collect(expand(subs(f(eta)=f[0](eta)+f[1](eta)*p,g(eta)=g[0](eta)+g[1](eta)*p,hpm2)),p);

(-1.*R*(diff(f[1](eta), eta))*g[1](eta)+R*f[1](eta)*(diff(g[1](eta), eta)))*p^3+(-1.*R*(diff(f[0](eta), eta))*g[1](eta)-1.*R*(diff(f[1](eta), eta))*g[0](eta)+R*f[0](eta)*(diff(g[1](eta), eta))+R*f[1](eta)*(diff(g[0](eta), eta)))*p^2+(diff(diff(g[1](eta), eta), eta)+1.0*(diff(f[1](eta), eta))-1.*R*(diff(f[0](eta), eta))*g[0](eta)+R*f[0](eta)*(diff(g[0](eta), eta)))*p+diff(diff(g[0](eta), eta), eta)+1.0*(diff(f[0](eta), eta)) = 0

(12)

B1:=diff(g[0](eta),eta$2)+2*K[r]*(diff(f[0](eta),eta))=0;
B2:=diff(g[1](eta),eta$2)+2*K[r]*(diff(f[1](eta),eta))-R*(diff(f[0](eta),eta))*g[0](eta)+R*f[0](eta)*(diff(g[0](eta),eta))=0;

diff(diff(g[0](eta), eta), eta)+1.0*(diff(f[0](eta), eta)) = 0

 

diff(diff(g[1](eta), eta), eta)+1.0*(diff(f[1](eta), eta))-R*(diff(f[0](eta), eta))*g[0](eta)+R*f[0](eta)*(diff(g[0](eta), eta)) = 0

(13)

icsB1:=f[0](0)=0,D(f[0])(0)=1,g[0](0)=0,f[0](1)=lambda,D(f[0])(1)=0,g[0](1)=0;
icsB2:=f[1](0)=0,D(f[1])(0)=0,g[1](0)=0,f[1](1)=0,D(f[1])(1)=0,g[1](1)=0;

f[0](0) = 0, (D(f[0]))(0) = 1, g[0](0) = 0, f[0](1) = .5, (D(f[0]))(1) = 0, g[0](1) = 0

 

f[1](0) = 0, (D(f[1]))(0) = 0, g[1](0) = 0, f[1](1) = 0, (D(f[1]))(1) = 0, g[1](1) = 0

(14)

FORequ3

C:=collect(expand(subs(theta(eta)=theta[0](eta)+theta[1](eta)*p,phi(eta)=phi[0](eta)+phi[1](eta)*p,f(eta)=f[0](eta)+f[1](eta)*p,hpm3)),p);

(10.*R*f[1](eta)*(diff(theta[1](eta), eta))+.1*(diff(phi[1](eta), eta))*(diff(theta[1](eta), eta))+.1*(diff(theta[1](eta), eta))^2)*p^3+(10.*R*f[0](eta)*(diff(theta[1](eta), eta))+10.*R*f[1](eta)*(diff(theta[0](eta), eta))+.1*(diff(phi[0](eta), eta))*(diff(theta[1](eta), eta))+.1*(diff(phi[1](eta), eta))*(diff(theta[0](eta), eta))+.2*(diff(theta[0](eta), eta))*(diff(theta[1](eta), eta)))*p^2+(diff(diff(theta[1](eta), eta), eta)+10.*R*f[0](eta)*(diff(theta[0](eta), eta))+.1*(diff(phi[0](eta), eta))*(diff(theta[0](eta), eta))+.1*(diff(theta[0](eta), eta))^2)*p+diff(diff(theta[0](eta), eta), eta) = 0

(15)

C1:=diff(theta[0](eta),eta$2)=0;
C2:=diff(theta[1](eta), eta, eta)+Pr*R*f[0](eta)*(diff(theta[0](eta), eta))+Nb*(diff(phi[0](eta), eta))*(diff(theta[0](eta), eta))+Nt*(diff(theta[0](eta), eta))^2=0;

diff(diff(theta[0](eta), eta), eta) = 0

 

diff(diff(theta[1](eta), eta), eta)+10*R*f[0](eta)*(diff(theta[0](eta), eta))+.1*(diff(phi[0](eta), eta))*(diff(theta[0](eta), eta))+.1*(diff(theta[0](eta), eta))^2 = 0

(16)

icsC1:=theta[0](0)=1,theta[0](1)=0;
icsC2:=f[0](0)=0,D(f[0])(0)=1,f[1](1)=0,D(f[1])(1)=0,theta[1](0)=0,theta[1](1)=0,phi[0](0)=0,phi[0](1)=0;

theta[0](0) = 1, theta[0](1) = 0

 

f[0](0) = 0, (D(f[0]))(0) = 1, f[1](1) = 0, (D(f[1]))(1) = 0, theta[1](0) = 0, theta[1](1) = 0, phi[0](0) = 0, phi[0](1) = 0

(17)

FORequ4

E:=collect(expand(subs(theta(eta)=theta[0](eta)+theta[1](eta)*p,phi(eta)=phi[0](eta)+phi[1](eta)*p,f(eta)=f[0](eta)+f[1](eta)*p,hpm4)),p);

.5*R*f[1](eta)*p^3*(diff(phi[1](eta), eta))+(.5*R*f[0](eta)*(diff(phi[1](eta), eta))+.5*R*f[1](eta)*(diff(phi[0](eta), eta)))*p^2+(diff(diff(phi[1](eta), eta), eta)+1.000000000*(diff(diff(theta[1](eta), eta), eta))+.5*R*f[0](eta)*(diff(phi[0](eta), eta)))*p+diff(diff(phi[0](eta), eta), eta)+1.000000000*(diff(diff(theta[0](eta), eta), eta)) = 0

(18)

E1:=diff(phi[0](eta),eta$2)+Nt*(diff(theta[0](eta),eta$2))/Nb=0;
E2:=diff(phi[1](eta),eta$2)+Nt*(diff(theta[1](eta),eta$2))/Nb+R*Sc*f[0](eta)*(diff(phi[0](eta),eta))=0;

diff(diff(phi[0](eta), eta), eta)+1.000000000*(diff(diff(theta[0](eta), eta), eta)) = 0

 

diff(diff(phi[1](eta), eta), eta)+1.000000000*(diff(diff(theta[1](eta), eta), eta))+.5*R*f[0](eta)*(diff(phi[0](eta), eta)) = 0

(19)

icsE1:=phi[0](0)=1,phi[0](1)=0;
icsE2:=f[0](0)=0,D(f[0])(0)=1,f[1](1)=0,D(f[1])(1)=0,theta[1](0)=0,theta[1](1)=0,phi[1](0)=0,phi[1](1)=0;

phi[0](0) = 1, phi[0](1) = 0

 

f[0](0) = 0, (D(f[0]))(0) = 1, f[1](1) = 0, (D(f[1]))(1) = 0, theta[1](0) = 0, theta[1](1) = 0, phi[1](0) = 0, phi[1](1) = 0

(20)

``

NULL



Download Project.mw


Project.mw

Download Project.mw

thanks for your favorits

Please check this:

N:=3;

sum1 := lcm(N, 0)+lcm(N, 1)+lcm(N, 2)+lcm(N, 3);

sum2 := sum(lcm(N, k), k = 0 .. N);

 

Why is sum2 wrong?

 

Regards,

César Lozada

 

hi.

how i can solve two equation with respect to parameter sigma1

SOLL.mw

restart; pprime11 := -16395.36603*q1+5.811117425*q1*sigma1^2+3526.724044*p1-1.250000000*p1*sigma1^2+4.999870968*10^11*p1^3+4.999870970*10^11*p1*q1^2+7.967307034*10^14*p1^2*q1+4.999870966*10^12*sigma1*p1^2*q1-2.655769012*10^14*q1^3+4.999870968*10^12*sigma1*q1^3-17633.62022*q1*sigma1+6.250000000*q1*sigma1^3

qprime11 := 2.655769012*10^14*p1^3-7.967307034*10^14*p1*q1^2+4.999870970*10^11*p1^2*q1-4.999870968*10^12*sigma1*p1^3-4.999870966*10^12*p1*sigma1*q1^2+3526.724044*q1-1.250000000*q1*sigma1^2+16395.36603*p1-5.811117425*p1*sigma1^2+4.999870968*10^11*q1^3+17633.62022*p1*sigma1-6.250000000*p1*sigma1^3:

-50 < sigma1 and sigma1 < 50:

sigma1 <> 53.11665685, -53.11665685:

SOLL := solve({pprime11, qprime11}, real)

Warning,  computation interrupted

 

``


Download SOLL.mw

Hi all, 

Is it possible, and how, to disable the automatic completion in the "Advanced Search / keyword" field ?

Underlying this question is my looking for informations about cmaple (beyond what the help page displays : if I can't find any I will ask some specific ones later). But every time I type "cmaple" in the keyword textfield, it is replaced by "campée" (which is a french word ... I guess english people will obtain something different)

Hello,

does anyone know a way to combine two plots in one where one is created with ScatterPlot3D (Package:Statistics) and the other one with plot3D (Package:plots)?

 

Normally you would write something like this:

but that only works if the plots are from the same package...

The first example is very slow compared to the second.  The difference is in the definition of f().

restart;
y := int(1/(-0.4016e-1*m^(2/3)-0.211e-3*m^(5/3)), m);
f:= unapply(abs(y), m):
n := 500: ## sample size
M := <seq(2*idx/n,idx=1..n)>; ## m
Y := f~(M)+~Statistics:-Sample(Normal(0,3), n)^+; ## signal + noise

restart;
y := int(1/(-0.4016e-1*m^(2/3)-0.211e-3*m^(5/3)), m);
f:= (x) -> abs(subs(m=x,y));
n := 500: ## sample size
M := <seq(2*idx/n,idx=1..n)>; ## m
Y := f~(M)+~Statistics:-Sample(Normal(0,3), n)^+; ## signal + noise


find x852 given that

x0=0.250

x1=2.00

xn=(1/9)*sqrt(7+xn-1) /xn-2

 

I don't know how to solve this problem.

Anyone please help me with it!

Thanks a lot

Is it possible to share contents between two different Maple worksheets ? Suppose for example, I want to use certain expression number (10) of  Worksheet 1 in worksheet 2, can I call that expression (10) in worksheet 2 ? I am asking this question because copying expressions between different worksheets is not easy task, sometime we unable copy expressions when they are too large. In my case after carrying out very tedious and lengthy calculations Maple stopped responding, now I have an idea that if I import last output of present worksheet in new worksheet may be I could continue my calculations.

Regards

The code below projects a torus illuminated by a point light source located at the origin onto an ellipsoid as the torus's centre moves along the x axis from [-0.8,0,0] to [0.8,0,0].

Ellipsoid := (1/32)*x^2+(1/18)*y^2+(1/12)*z^2 = 1:
EllipsoidTitle := Typesetting:-Typeset((1/32)*x^2+(1/18)*y^2+(1/12)*z^2 = 1):
DispEllipsoid := implicitplot3d(Ellipsoid, x = -10 .. 10, y = -10 .. 10, z = 1.25 .. 5, style = surface, color = yellow, grid = [30, 30, 30]):
TorusVorig := Vector([(1+.25*cos(v))*cos(u), (1+.25*cos(v))*sin(u), .6+.25*sin(v)]):

i := 0;

for x from -.8 by .1 to .81 do

i := i+1;

TorusV := `<,>`(x, 0, 0)+TorusVorig:

DispTorusV := plot3d(TorusV, u = 0 .. 2*Pi, v = 0 .. 2*Pi, shading = xyz):

NormTorusV := Normalize(TorusV, Euclidean):

Vadj := solve((1/32)*w^2*NormTorusV[1]^2+(1/18)*w^2*NormTorusV[2]^2+(1/12)*w^2*NormTorusV[3]^2 = 1, w):

if evalf(eval(Vadj[1]*NormTorusV[3], [u = Pi, v = Pi])) > 0 then

DispTorusVproj := plot3d(Vadj[1]*NormTorusV, u = 0 .. 2*Pi, v = 0 .. 2*Pi):

else

DispTorusVproj := plot3d(Vadj[2]*NormTorusV, u = 0 .. 2*Pi, v = 0 .. 2*Pi):

end if:

Disp[i] := display(DispTorusV, DispEllipsoid, DispTorusVproj, view = [-10 .. 10, -10 .. 10, 0 .. 5], scaling = constrained, Plot3Daxes, title = typeset("Project %1 onto %2 from a light at the origin", TorusV, EllipsoidTitle), titlefont = [Courier, bold, 14]):

end do:

display(seq(Disp[j], j = 1 .. i), insequence = true);

How can I plot the unmoving torus centred on the z axis projected onto the ellipsoid illuminated by a point light source moving on the x axis from [-0.8,0,0] to [0.8,0,0]?

Is there an elegant way to plot a surface with three given parameters, such as
x=(5+w\cos v)\cos u, y=(5+w\cos v)\sin u, z=w\sin v

with u,v between 0 and 2Pi and w between 0 and 3?

Hello dear!

Hope everyone fine, I am facing to solve the attached problem please find and fix it. I am waiting your kind response. 

naveed.mw

y := int(1/(-0.4016e-1*m^(2/3)-0.211e-3*m^(5/3)), m)

I have to  draw  plot m against y. I can draw plot y against m but i don't can draw plot m against y. Please help me.

I have entered three functions into Maple and I would like to create a set of all possible two-function and three-function compositions involving the three functions. For instance, for my three functions f(x), g(x) and h(x), the set would contain f(g(x)), g(f(x)), f(g(h(x))), f(f(f(x))), etc. 

I'm also looking for a method that will be generalisable to larger numbers of initial functions than just three.

I would like the C-Text style in 14pt Times Roman while the C-2D-Math style is 12pt.

My use case is that I am typing in a single execution block.

I use Format >> Styles and select the style for C-Text and set it to 14pt Times. I click OK to close the dialog. Next I repeat this for the C-2D-Math style but this time set the font size to 12pt and, for testing, the colour to blue. The effect is to give me 14pt Times for both styles, though the C-text is black and the 2-D-Math is blue.

Can the effect I want be achieved, or is this a bug/feature?

This is Maple 2016.1 on Windows 10 64bit

 Thanks for any help

I have used solve to find the solution to an equation that has two solutions, and I want to give each solution a label so that I can use each individually in subsequent manipulations. How do I label each solution separately?

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