# Maple Questions and PostsMaple Questions and Posts Feed

These are Posts and Questions associated with the product, Maple

### Solving with HPM...

5 hours ago
1 0

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;
 (1)
 > 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;  (2)  > 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;  (3)  > 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;  (4)  > f(eta)=sum(f[i](eta)*p^i,i=0..1);  (5)  > g(eta)=sum(g[i](eta)*p^i,i=0..1);  (6)  > theta(eta)=sum(theta[i](eta)*p^i,i=0..1);  (7)  > phi(eta)=sum(phi[i](eta)*p^i,i=0..1);  (8)  > A:=collect(expand(subs(f(eta)=f[0](eta)+f[1](eta)*p,g(eta)=g[0](eta)+g[1](eta)*p,hpm1)),p);  (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;  (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;  (11)  > B:=collect(expand(subs(f(eta)=f[0](eta)+f[1](eta)*p,g(eta)=g[0](eta)+g[1](eta)*p,hpm2)),p);  (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;  (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;  (14)  > 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);  (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;
 (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;
 (17)
 > 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);
 (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;
 (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;
 (20)
 >

Project.mw

### Sum vs expanded form...

10 hours ago
0 1

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,

### how i can solve two equation with respect to param...

15 hours ago
0 6

hi.

how i can solve two equation with respect to parameter sigma1

 >
 >
 >
 >
 >
 >

18 hours ago
0 2

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)

### Combine ScatterPlot3D (Package:Statistics) and plo...

18 hours ago
2 2

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...

### unapply slow compared to subs...

19 hours ago
1 3

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

### Second-Order Difference Equation...

19 hours ago
1 1

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.

Thanks a lot

### Sharing content between different Maple worksheet....

22 hours ago
1 5

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

### How to project a fixed object illuminated by a mov...

Yesterday at 4:37 PM
1 3

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]?

### Plot of parametric surface ...

Yesterday at 1:03 PM
0 6

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?

### Problem with solution of linear algebraic system ...

Yesterday at 11:49 AM
0 11

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

### Problem with plot...

Yesterday at 10:47 AM
1 13

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.

### Composition of functions...

Yesterday at 10:46 AM
2 7

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.

### Font sizes in different styles...

Yesterday at 10:39 AM
1 0

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

### Labeling solutions...

Yesterday at 10:39 AM
0 3

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
﻿