Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Dear esteem Colleagues,

Please how do I modify the following two files (though similar) to get consistent errors? I am not sure where I made the mistake.

Any modifications would be appreciated.

Thank you all for your time and mentorship. Best regard

Biratu_Mapleprimes.mw

DDE_2_Mapleprime.mw

I would like to emphasize a particular region of my plot by shading the whole strip between x=0 and x=1. I learned of the command shadebetween, but the functions it takes as arguments for the boundaries of the region to shade must be functions of x.

Does someone know how to shade between two vertical lines?

I am a new user to Maple, but have used PTC's Mathcad and Prime.

I have several matrices that I need to combine both vertically and horizontally.  The command augment will combine the matrices horizontally.  I was unable to find a command to combine the matrices vertically.  I tried the stack command (Prime command).  The Maple stack command appears to have a different functionality.  Could you suggest which command would do the job?  The matrices are large and I would like to limit the number of rows and columns shown in the document.

The next step will be sorting the data. I am researching this at this time.

Thank you for the support,

David Tietje

Alternating serie

 

sum((-1)^(n+1)/(2*n-1), n = 1 .. infinity)

(1/4)*Pi

(1)

 

sum((-1)^(n + 1)/(2*n - 1), n = 1 .. infinity):

sum((-1)^(n+1)/(2*n-1), n = 1 .. 4)

76/105

(2)

expand(sum((-1)^(n + 1)/(2*n - 1), n = 1 .. 4),symbolic);

76/105

(3)

?expand

series(sum((-1)^(n + 1)/(2*n - 1), n = 1 .. infinity),n=0,5);

series((1/4)*Pi,n)

(4)

 

Info series

   

How to get for n= 4  "for (∑)(((-1)^(n+1))/(2 n-1))  =   symbolic term 1+ symbolic term 2+... "

 

 

Download onderzoek_reeks_-hoe_krijg_ik_een_partieke_symbolische_som.mw

Input:

 a := x^2;
 whattype(x);
 b := x[1]^2;
 whattype(x[1]);
 CodeGeneration[C](a);
 CodeGeneration[C](b);

Output:

Do you know why cg0 =/= x[0]*x[0]?

Hello people in MaplePrimes,

I can't understand a code with PLOT3D using GRID in it.
I hope you will give me explanation about it.

restart;
k:=[[1,2,10],[1,1,8],[0,1,5],[0,0,6]];
PLOT3D(GRID(1..2,1..3,k),
       AXESLABELS(x,y,z));

I cannot understand the correspondence between points in the graph and lists in the code such as [1,2,10], [1,1,8].

 As two ranges in GRID augments in the code are 1..2 and 1..3, x takes value from 1 to 2, and
y from 1 to 3 in the picture.
And, as k is k:=[[1,2,10],[1,1,8],[0,1,5],[0,0,6]], which means this list of lists are 4 X 3, so in the picture
as for x the interval of 1 to 2 is divided to three sections with the points of value of 0, 1/3, 2/3 and 3/3, which total number is 4.
And, as for y the interval of 1 to 3 is devided to two sections with the points of value of 1, 2 and 3, which total number is 3.

And, I cannot understand why from the grid of [1,1,8] in the code, which I think is the coodinate of (1, 1) on x-y plane, does not mean that the value of z on that point on the graph is not 8, but 1.

graph.mw

When I added kernelopts('assertlevel'=2): now Maple gives an error from call to solve. Also PDEtools:-Solve  gives same error. 

If I remove the  kernelopts('assertlevel'=2): it works OK and gives solution.

Is this known issue? I'd like to keep kernelopts('assertlevel'=2): and still use solve. Maple 2021.2 on windows 10

interface(version);

`Standard Worksheet Interface, Maple 2021.2, Windows 10, November 23 2021 Build ID 1576349`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1131 and is the same as the version installed in this computer, created 2022, January 7, 9:5 hours Pacific Time.`

restart;

3

eq:=1/8*2^(1/2)*(-2*x*(w^4*x^11+(4*w^4-6*w^3)*x^10+(10*w^4-22*w^3+17*w^2)*x^9+(16*w^4-50*w^3+62*w^2-30*w)*x^8+(71/2+19*w^4-72*w^3+132*w^2-114*w)*x^7+(140-685/3*w+16*w^4-76*w^3+176*w^2)*x^6+(263-841/3*w+10*w^4-56*w^3+331/2*w^2)*x^5+(292-1385/6*w+105*w^2+4*w^4-30*w^3)*x^4+(821/4+w^4-733/6*w-10*w^3+91/2*w^2)*x^3+(173/2-2*w^3-122/3*w+11*w^2)*x^2+(77/4+3/2*w^2-37/6*w)*x+3/2-1/2*w)*(-1+I*3^(1/2))^(1/2)+2^(1/2)*(I*x*(w^4*x^11+(4*w^4-6*w^3)*x^10+(10*w^4-22*w^3+17*w^2)*x^9+(16*w^4-50*w^3+62*w^2-30*w)*x^8+(71/2+19*w^4-72*w^3+132*w^2-114*w)*x^7+(140-685/3*w+16*w^4-76*w^3+176*w^2)*x^6+(263-841/3*w+10*w^4-56*w^3+331/2*w^2)*x^5+(292-1385/6*w+105*w^2+4*w^4-30*w^3)*x^4+(821/4+w^4-733/6*w-10*w^3+91/2*w^2)*x^3+(173/2-2*w^3-122/3*w+11*w^2)*x^2+(77/4+3/2*w^2-37/6*w)*x+3/2-1/2*w)*3^(1/2)-1/4-3*w^4*x^12+(-12*w^4+10*w^3)*x^11+(-30*w^4+26*w^3-7*w^2)*x^10+(-48*w^4+54*w^3+14*w^2-14*w)*x^9+(63/2-57*w^4+64*w^3+36*w^2-98*w)*x^8+(140-48*w^4+68*w^3+80*w^2-565/3*w)*x^7+(255-769/3*w-30*w^4+48*w^3+127/2*w^2)*x^6+(292-1169/6*w-12*w^4+34*w^3+45*w^2)*x^5+(797/4-661/6*w+7/2*w^2-3*w^4+14*w^3)*x^4+(173/2-80/3*w+6*w^3-w^2)*x^3+(69/4-25/6*w-9/2*w^2)*x^2+(3/2+3/2*w)*x))/(x^2+x+1)^4/x^4;

(1/8)*2^(1/2)*(-2*x*(w^4*x^11+(4*w^4-6*w^3)*x^10+(10*w^4-22*w^3+17*w^2)*x^9+(16*w^4-50*w^3+62*w^2-30*w)*x^8+(71/2+19*w^4-72*w^3+132*w^2-114*w)*x^7+(140-(685/3)*w+16*w^4-76*w^3+176*w^2)*x^6+(263-(841/3)*w+10*w^4-56*w^3+(331/2)*w^2)*x^5+(292-(1385/6)*w+105*w^2+4*w^4-30*w^3)*x^4+(821/4+w^4-(733/6)*w-10*w^3+(91/2)*w^2)*x^3+(173/2-2*w^3-(122/3)*w+11*w^2)*x^2+(77/4+(3/2)*w^2-(37/6)*w)*x+3/2-(1/2)*w)*(-1+I*3^(1/2))^(1/2)+2^(1/2)*(I*x*(w^4*x^11+(4*w^4-6*w^3)*x^10+(10*w^4-22*w^3+17*w^2)*x^9+(16*w^4-50*w^3+62*w^2-30*w)*x^8+(71/2+19*w^4-72*w^3+132*w^2-114*w)*x^7+(140-(685/3)*w+16*w^4-76*w^3+176*w^2)*x^6+(263-(841/3)*w+10*w^4-56*w^3+(331/2)*w^2)*x^5+(292-(1385/6)*w+105*w^2+4*w^4-30*w^3)*x^4+(821/4+w^4-(733/6)*w-10*w^3+(91/2)*w^2)*x^3+(173/2-2*w^3-(122/3)*w+11*w^2)*x^2+(77/4+(3/2)*w^2-(37/6)*w)*x+3/2-(1/2)*w)*3^(1/2)-1/4-3*w^4*x^12+(-12*w^4+10*w^3)*x^11+(-30*w^4+26*w^3-7*w^2)*x^10+(-48*w^4+54*w^3+14*w^2-14*w)*x^9+(63/2-57*w^4+64*w^3+36*w^2-98*w)*x^8+(140-48*w^4+68*w^3+80*w^2-(565/3)*w)*x^7+(255-(769/3)*w-30*w^4+48*w^3+(127/2)*w^2)*x^6+(292-(1169/6)*w-12*w^4+34*w^3+45*w^2)*x^5+(797/4-(661/6)*w+(7/2)*w^2-3*w^4+14*w^3)*x^4+(173/2-(80/3)*w+6*w^3-w^2)*x^3+(69/4-(25/6)*w-(9/2)*w^2)*x^2+(3/2+(3/2)*w)*x))/((x^2+x+1)^4*x^4)

solve(eq = 0,w)

(1/2)*(2*x^2+1)/((x^2+x+1)*x)

PDEtools:-Solve(eq=0,w)

w = (1/2)*(2*x^2+1)/((x^2+x+1)*x)

restart;

interface(warnlevel=4);
kernelopts('assertlevel'=2):

3

eq:=1/8*2^(1/2)*(-2*x*(w^4*x^11+(4*w^4-6*w^3)*x^10+(10*w^4-22*w^3+17*w^2)*x^9+(16*w^4-50*w^3+62*w^2-30*w)*x^8+(71/2+19*w^4-72*w^3+132*w^2-114*w)*x^7+(140-685/3*w+16*w^4-76*w^3+176*w^2)*x^6+(263-841/3*w+10*w^4-56*w^3+331/2*w^2)*x^5+(292-1385/6*w+105*w^2+4*w^4-30*w^3)*x^4+(821/4+w^4-733/6*w-10*w^3+91/2*w^2)*x^3+(173/2-2*w^3-122/3*w+11*w^2)*x^2+(77/4+3/2*w^2-37/6*w)*x+3/2-1/2*w)*(-1+I*3^(1/2))^(1/2)+2^(1/2)*(I*x*(w^4*x^11+(4*w^4-6*w^3)*x^10+(10*w^4-22*w^3+17*w^2)*x^9+(16*w^4-50*w^3+62*w^2-30*w)*x^8+(71/2+19*w^4-72*w^3+132*w^2-114*w)*x^7+(140-685/3*w+16*w^4-76*w^3+176*w^2)*x^6+(263-841/3*w+10*w^4-56*w^3+331/2*w^2)*x^5+(292-1385/6*w+105*w^2+4*w^4-30*w^3)*x^4+(821/4+w^4-733/6*w-10*w^3+91/2*w^2)*x^3+(173/2-2*w^3-122/3*w+11*w^2)*x^2+(77/4+3/2*w^2-37/6*w)*x+3/2-1/2*w)*3^(1/2)-1/4-3*w^4*x^12+(-12*w^4+10*w^3)*x^11+(-30*w^4+26*w^3-7*w^2)*x^10+(-48*w^4+54*w^3+14*w^2-14*w)*x^9+(63/2-57*w^4+64*w^3+36*w^2-98*w)*x^8+(140-48*w^4+68*w^3+80*w^2-565/3*w)*x^7+(255-769/3*w-30*w^4+48*w^3+127/2*w^2)*x^6+(292-1169/6*w-12*w^4+34*w^3+45*w^2)*x^5+(797/4-661/6*w+7/2*w^2-3*w^4+14*w^3)*x^4+(173/2-80/3*w+6*w^3-w^2)*x^3+(69/4-25/6*w-9/2*w^2)*x^2+(3/2+3/2*w)*x))/(x^2+x+1)^4/x^4:

solve(eq = 0,w)

Error, (in Internal:-FactorEasy) assertion failed, Internal:-FactorEasy expects its return value to be of type list(_POWER(POLYNOMIAL, posint)), but computed [_POWER(POLYNOMIAL([0, [z, x, r1, r2, r3], [[[[1], [0, -1]], 0, [[1]]], [[1], 0, [1]], [-3, 0, 1]]], [[[0, [[1]]]]]), 1), _POWER(POLYNOMIAL([0, [z, x, r1, r2, r3], [[[[1], [0, -1]], 0, [[1]]], [[1], 0, [1]], [-3, 0, 1]]], [[[[0, [1]]]]]), FAIL), _POWER(POLYNOMIAL([0, [z, x, r1, r2, r3], [[[[1], [0, -1]], 0, [[1]]], [[1], 0, [1]], [-3, 0, 1]]], [[[[[0, 1]]]]]), FAIL), _POWER(POLYNOMIAL([0, [z, x, r1, r2, r3], [[[[1], [0, -1]], 0, [[1]]], [[1], 0, [1]], [-3, 0, 1]]], [[[[[-1], [0, 1]]], 0, [[[-8], [0, 8]]], 0, [[[-24], [0, 24]]], 0, [[[-32], [0, 32]]], 0, [[[-16], [0, 16 ... , [[[-160], [0, 160]]], [[[-64], [0, 64]]], [[[-16], [0, 16]]]]]), 1)]

PDEtools:-Solve(eq=0,w)

Error, (in Internal:-FactorEasy) assertion failed, Internal:-FactorEasy expects its return value to be of type list(_POWER(POLYNOMIAL, posint)), but computed [_POWER(POLYNOMIAL([0, [z, x, r1, r2, r3], [[[[1], [0, -1]], 0, [[1]]], [[1], 0, [1]], [-3, 0, 1]]], [[[0, [[1]]]]]), 1), _POWER(POLYNOMIAL([0, [z, x, r1, r2, r3], [[[[1], [0, -1]], 0, [[1]]], [[1], 0, [1]], [-3, 0, 1]]], [[[[0, [1]]]]]), FAIL), _POWER(POLYNOMIAL([0, [z, x, r1, r2, r3], [[[[1], [0, -1]], 0, [[1]]], [[1], 0, [1]], [-3, 0, 1]]], [[[[[0, 1]]]]]), FAIL), _POWER(POLYNOMIAL([0, [z, x, r1, r2, r3], [[[[1], [0, -1]], 0, [[1]]], [[1], 0, [1]], [-3, 0, 1]]], [[[[[-1], [0, 1]]], 0, [[[-8], [0, 8]]], 0, [[[-24], [0, 24]]], 0, [[[-32], [0, 32]]], 0, [[[-16], [0, 16 ... , [[[-160], [0, 160]]], [[[-64], [0, 64]]], [[[-16], [0, 16]]]]]), 1)]

 

Download assertion_failed.mw

restart:

sys:={-diff(v(x,t),t)+0.5*p*diff(u(x,t),x,x)+q*u(x,t)*(u(x,t)^2+v(x,t)^2)=0,diff(u(x,t),t)+0.5*p*diff(v(x,t),x,x)+q*v(x,t)*(u(x,t)^2+v(x,t)^2)=0};
        /                      /  2         \
        |/ d         \         | d          |
sys := < |--- u(x, t)| + 0.5 p |---- v(x, t)|
        |\ dt        /         |   2        |
        \                      \ dx         /

               /       2          2\       / d         \
   + q v(x, t) \u(x, t)  + v(x, t) / = 0, -|--- v(x, t)|
                                           \ dt        /

           /  2         \                                      \ 
           | d          |             /       2          2\    | 
   + 0.5 p |---- u(x, t)| + q u(x, t) \u(x, t)  + v(x, t) / = 0 >
           |   2        |                                      | 
           \ dx         /                                      / 
eq1 := diff(u(x,t),t) = u__t(x,t):
eq2 := diff(v(x,t),t) = v__t(x,t):

sys_tmp := subs(eq1, eq2, sys):

sys_new := sys_tmp union {eq1, eq2}:

Boundary conditions:
bc :=
    u(0,t) = 2,
    v(0,t) = 0;
                 bc := u(0, t) = 2, v(0, t) = 0
Initial conditions:
ic :=
    u(x,0) = tanh(2*Pi),
    v(x,0) = tanh(2*Pi),
    u__t(x,0) = 0,
    v__t(x,0) = 0;
 
ic := u(x, 0) = tanh(2 Pi), v(x, 0) = tanh(2 Pi), u__t(x, 0) = 0, 

  v__t(x, 0) = 0
Solve the system:
pdsol := pdsolve(subs(p=1, q=0.5, sys_new), {ic, bc}, numeric);

I want to change my variables. The coding below shows the influence of the Nb and Nt on the local Nusselt number (-theta') against the convection Bi.

But now I want it to be  the influence of the Bi on the local Nusselt number (-theta') against the Nb and Nt.

Can anyone help me?

NULL

with(plots)

DE1 := diff(f(eta), `$`(eta, 3))+f(eta)*(diff(f(eta), `$`(eta, 2)))-(diff(f(eta), eta))^2 = 0

diff(diff(diff(f(eta), eta), eta), eta)+f(eta)*(diff(diff(f(eta), eta), eta))-(diff(f(eta), eta))^2 = 0

(1)

DE2 := diff(theta(eta), `$`(eta, 2))+Pr*f(eta)*(diff(theta(eta), eta))+Pr*Nb*(diff(theta(eta), eta))*(diff(phi(eta), eta))+Pr*Nt*(diff(theta(eta), eta))^2 = 0

diff(diff(theta(eta), eta), eta)+Pr*f(eta)*(diff(theta(eta), eta))+Pr*Nb*(diff(theta(eta), eta))*(diff(phi(eta), eta))+Pr*Nt*(diff(theta(eta), eta))^2 = 0

(2)

DE3 := diff(phi(eta), `$`(eta, 2))+Le*(diff(phi(eta), eta))+Nt*(diff(theta(eta), `$`(eta, 2)))/Nb

diff(diff(phi(eta), eta), eta)+Le*(diff(phi(eta), eta))+Nt*(diff(diff(theta(eta), eta), eta))/Nb

(3)

BC1 := f(0) = 0, (D(f))(0) = 1, (D(f))(10) = 0

f(0) = 0, (D(f))(0) = 1, (D(f))(10) = 0

(4)

BC2 := theta(10) = 0, (D(theta))(0) = -Bi*(1-theta(0))

theta(10) = 0, (D(theta))(0) = -Bi*(1-theta(0))

(5)

BC3 := phi(0) = 1, phi(10) = 0

phi(0) = 1, phi(10) = 0

(6)

``

  getRes:= proc(a, x);
                local sol;
                if   type(x, numeric)
                then sol:= dsolve
                           ( eval
                             ( {BC1, BC2, BC3, DE1, DE2, DE3},
                               [Nt = a, Nb = a, Pr = 2, Le = 5, Bi = x]
                             ),
                             numeric,
                             output = listprocedure,
                             abserr = 0.0001,
                             maxmesh = 1024,
                             initmesh = 512
                           );
                else return 'procname(a,x)';
                fi;
                return -eval(diff(theta(eta), eta), sol)(0)
           end proc:

  cl:=[red, green, blue, yellow, black]:
  L:=[0.2, 0.4, 0.6,0.8,1.0]:
  display
  ( [ seq
      ( plot
        ( getRes( L[k], x),
          x=0..5,color = colorList[k], legend = ["Nb=Nt" = L[k]], legendstyle = [location = top],
          color=cl[k]
        ),
        k=1..5
      )
    ]
  )
               

 

 

 

Download odeProb2.mw

Contour integration notation

" (&int;)[+infinity]^(+infinity)((-x)^(z))/((e)^(x)-1). (&DifferentialD;x)/(x)"

 

The limits of integration are intented to indicate a path of integration which begins at + ∞, moves to th e left down the positive real axis, circles the orign once in positive ( counterclockwise) direction, and returns up to the positive real axis to  +∞

-How does this contour look like  in a  graph ?
- the "(&DifferentialD;x)/(x)" notation  ?
- calculating this complexe contour integral?

Seems that the concept of the contour integration is similar wit a line integral in real calculus ?

Some more information needed about singularities ( first en second order ..more?)

Nieuwe pagina 1 (hhofstede.nl)

NULL

Download contourintegraal_vraag1.mw

I have just come across this curious but really boring problem.
In the code snippet below, expr1 and expr2 are identical.

restart:
data := [a=1, b=2]:
convert(
  piecewise(And(x(t) > a, x(t) < b), 1, 0),
  Heaviside
):
expr1 := eval(eval(%, data),  x(t)=z):
plot(expr1, z=0..3);


convert(
  piecewise(And(z > a, z< b), 1, 0),
  Heaviside
):
expr2 := eval(%, data),:
plot(expr2, z=0..3);


But if I change the parameterization of the problem, expr2 is still correct but expr1 is not

restart:
data := [d=1.5, a=0.5]:
convert(
  piecewise(And(x(t) > d-a, x(t) < d+a), 1, 0),
  Heaviside
):
expr1 := eval(eval(%, data),  x(t)=z):
plot(expr1, z=0..3);


convert(
  piecewise(And(z > d-a, z< d+a), 1, 0),
  Heaviside
):
expr2 := eval(%, data),:
plot(expr2, z=0..3);

Where does this come from?

PS: I'm sorry not to be able loading the mw file

A user would like to know if it is possible to specify a data set say, x:=[1,2,3,4,5,6] and then extract a random sample from that data set, i.e. xsample:=[3,2,4] for a bootstrapping-type calculation.

We suggested they use something like the following:

restart; with(Statistics); my_data := [1, 2, 4, 5.5, 5.5, 6]; X := RandomVariable(EmpiricalDistribution(my_data)); s := Sample(X, 10); Bootstrap(Mean, X, samplesize = 4, replications = 10000)

HFloat(3.9984625)

(1)

NULL

Download array-random-sample.mw

Hello, 

I would like to write to a file the output of the command CodeGeneration[Matlab]. I couldn't find a way to write the output. 

What I am trying to do is to generate complex symbolic equations and expressions and write them as either a function or variables in matlab. 

As an example: 

exp := [sin(theta(1)), cos(theta(1))]; 

func := unapply(exp,[theta]); 

CodeGeneration:-Matlab(func)

If i can write the output of the above command in a matlab file, it will generate a matlab function file. 

I was using the command 'writeto' but this one basically outputs every line a command written to a file instead of the terminal, which is not what I want (it will output even the warnings, I know I can silent them!). 

can you please help.. thanks. 

Hello guys,

I want to plot two functions such as x(t) and y(t) in a unique diagram as a function of each other. In a routine way, one needs to solve one of these functions as t and then input its results in others. for example, solving x(t) to find t and then input this t(x) into y(t) to have y(x). but here problem is that I cannot solve x(t) to find t and so this routine solution is not accelssible.

x(t):=1 + (3*n*(v - 1)^2*A*(t^v)^2*(1 + alpha*(v - 1)^2*A^2*(t^v)^2*ln(m^2*t^2/((v - 1)^2*A^2*(t^v)^2))/(3*n^2*m^2*t^2) + A^2*beta*(v - 1)^2*(t^v)^2/(3*n^2*m^2*t^2))*((4*A^2*alpha*t^v*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2)) + 6*t^(-v + 2)*m^2*n^2 + 4*t^v*(beta - alpha/2)*A^2*(v - 1)^2)*sqrt(n^2*(v - 1)^2*A^2*t^(2*v)/v^2) - 3*n*A*(A^2*alpha*t^(2*v)*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2)) + A^2*beta*(v - 1)^2*t^(2*v) + 3*n^2*m^2*t^2))*(1 + ((4*A^2*alpha*t^v*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2)) + 6*t^(-v + 2)*m^2*n^2 + 4*t^v*(beta - alpha/2)*A^2*(v - 1)^2)*sqrt(n^2*(v - 1)^2*A^2*t^(2*v)/v^2) - 3*n*A*(A^2*alpha*t^(2*v)*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2)) + A^2*beta*(v - 1)^2*t^(2*v) + 3*n^2*m^2*t^2))/(3*n*A*(A^2*alpha*t^(2*v)*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2)) + A^2*beta*(v - 1)^2*t^(2*v) + 3*n^2*m^2*t^2))))/(2*v^2*(A^2*alpha*t^(2*v)*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2)) + A^2*beta*(v - 1)^2*t^(2*v) + 3*n^2*m^2*t^2)) - (3*n^2*(v - 1)^2*A^2*(t^v)^2*(1 + alpha*(v - 1)^2*A^2*(t^v)^2*ln(m^2*t^2/((v - 1)^2*A^2*(t^v)^2))/(3*n^2*m^2*t^2) + A^2*beta*(v - 1)^2*(t^v)^2/(3*n^2*m^2*t^2))*(((4*A^2*alpha*t^v*v*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2))/t + 4*A^2*alpha*t^v*(v - 1)^2*(2 - 2*v)/t + 6*t^(-v + 2)*(-v + 2)*m^2*n^2/t + 4*t^v*v*(beta - alpha/2)*A^2*(v - 1)^2/t)*sqrt(n^2*(v - 1)^2*A^2*t^(2*v)/v^2) + (4*A^2*alpha*t^v*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2)) + 6*t^(-v + 2)*m^2*n^2 + 4*t^v*(beta - alpha/2)*A^2*(v - 1)^2)*n^2*(v - 1)^2*A^2*t^(2*v)/(sqrt(n^2*(v - 1)^2*A^2*t^(2*v)/v^2)*v*t) - 3*n*A*(2*A^2*alpha*t^(2*v)*v*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2))/t + A^2*alpha*t^(2*v)*(v - 1)^2*(2 - 2*v)/t + 2*A^2*beta*(v - 1)^2*t^(2*v)*v/t + 6*n^2*m^2*t))/(3*n*A*(A^2*alpha*t^(2*v)*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2)) + A^2*beta*(v - 1)^2*t^(2*v) + 3*n^2*m^2*t^2)) - (((4*A^2*alpha*t^v*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2)) + 6*t^(-v + 2)*m^2*n^2 + 4*t^v*(beta - alpha/2)*A^2*(v - 1)^2)*sqrt(n^2*(v - 1)^2*A^2*t^(2*v)/v^2) - 3*n*A*(A^2*alpha*t^(2*v)*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2)) + A^2*beta*(v - 1)^2*t^(2*v) + 3*n^2*m^2*t^2))*(2*A^2*alpha*t^(2*v)*v*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2))/t + A^2*alpha*t^(2*v)*(v - 1)^2*(2 - 2*v)/t + 2*A^2*beta*(v - 1)^2*t^(2*v)*v/t + 6*n^2*m^2*t))/(3*n*A*(A^2*alpha*t^(2*v)*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2)) + A^2*beta*(v - 1)^2*t^(2*v) + 3*n^2*m^2*t^2)^2)))/(2*v^2):

y(t):=1 + ((4*A^2*alpha*t^v*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2)) + 6*t^(-v + 2)*m^2*n^2 + 4*t^v*(beta - alpha/2)*A^2*(v - 1)^2)*sqrt(n^2*(v - 1)^2*A^2*t^(2*v)/v^2) - 3*n*A*(A^2*alpha*t^(2*v)*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2)) + A^2*beta*(v - 1)^2*t^(2*v) + 3*n^2*m^2*t^2))/(3*n*A*(A^2*alpha*t^(2*v)*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2)) + A^2*beta*(v - 1)^2*t^(2*v) + 3*n^2*m^2*t^2)) - (((4*A^2*alpha*t^v*v*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2))/t + 4*A^2*alpha*t^v*(v - 1)^2*(2 - 2*v)/t + 6*t^(-v + 2)*(-v + 2)*m^2*n^2/t + 4*t^v*v*(beta - alpha/2)*A^2*(v - 1)^2/t)*sqrt(n^2*(v - 1)^2*A^2*t^(2*v)/v^2) + (4*A^2*alpha*t^v*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2)) + 6*t^(-v + 2)*m^2*n^2 + 4*t^v*(beta - alpha/2)*A^2*(v - 1)^2)*n^2*(v - 1)^2*A^2*t^(2*v)/(sqrt(n^2*(v - 1)^2*A^2*t^(2*v)/v^2)*v*t) - 3*n*A*(2*A^2*alpha*t^(2*v)*v*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2))/t + A^2*alpha*t^(2*v)*(v - 1)^2*(2 - 2*v)/t + 2*A^2*beta*(v - 1)^2*t^(2*v)*v/t + 6*n^2*m^2*t))/(3*n*A*(A^2*alpha*t^(2*v)*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2)) + A^2*beta*(v - 1)^2*t^(2*v) + 3*n^2*m^2*t^2)) - (((4*A^2*alpha*t^v*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2)) + 6*t^(-v + 2)*m^2*n^2 + 4*t^v*(beta - alpha/2)*A^2*(v - 1)^2)*sqrt(n^2*(v - 1)^2*A^2*t^(2*v)/v^2) - 3*n*A*(A^2*alpha*t^(2*v)*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2)) + A^2*beta*(v - 1)^2*t^(2*v) + 3*n^2*m^2*t^2))*(2*A^2*alpha*t^(2*v)*v*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2))/t + A^2*alpha*t^(2*v)*(v - 1)^2*(2 - 2*v)/t + 2*A^2*beta*(v - 1)^2*t^(2*v)*v/t + 6*n^2*m^2*t))/(3*n*A*(A^2*alpha*t^(2*v)*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2)) + A^2*beta*(v - 1)^2*t^(2*v) + 3*n^2*m^2*t^2)^2))*n*A*(A^2*alpha*t^(2*v)*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2)) + A^2*beta*(v - 1)^2*t^(2*v) + 3*n^2*m^2*t^2)/((4*A^2*alpha*t^v*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2)) + 6*t^(-v + 2)*m^2*n^2 + 4*t^v*(beta - alpha/2)*A^2*(v - 1)^2)*sqrt(n^2*(v - 1)^2*A^2*t^(2*v)/v^2) - 3*n*A*(A^2*alpha*t^(2*v)*(v - 1)^2*ln(m^2*t^(2 - 2*v)/((v - 1)^2*A^2)) + A^2*beta*(v - 1)^2*t^(2*v) + 3*n^2*m^2*t^2)):

there are x(t) and y(t). I want to plot y as x, not t. so please help me.

with best

Hello people in Mapleprimes,
I haven't written in this site for a long time.

I have a question in the below program, which is to write ribbons.
For the implementation of this program, 
I wrote this.
ribbonplot5([cos, sin, cos + sin], -Pi .. Pi,numpoints=20);

In the part of pattern matching, as -Pi .. Pi above is a range, so it is OK.
But, when I changed this part to x=-Pi..Pi, an error message appears.

ribbonplot5([cos, sin, cos + sin],x=-Pi .. Pi,numpoints=20);

brings error messages:
"Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct"

In the code of ribbonplot5,  x=-Pi..Pi which is the type of name=range shoud satisfy the pattern matching, as I wrote in the first part of the program as 
ribbonplot5 := proc(Flist, r1::{range,name=range})

I cannot know why the part of the program:
 
" else
       newFlist := map(unapply, Flist, lhs(r1));
     opts := ['labels'=[lhs(r1), " "," "],
                 args[3 .. nargs]];
    ribbonplot5(newFlist,rhs(r1),op(opts)):
"

wouldn't work well.

I wish I could get an answer to this. 

Thanks in advance.

This is a program in maple9 Advanced Programming Gude p. 253

graphic_ribbonplot.mw

restart;
extend := proc(f)
     local x, y;
     unapply(f(x), x, y);
end proc:
p:=x->cos(2*x):
q:=extend(p);


ribbonplot5 := proc(Flist, r1::{range,name=range})
     local i, m, p, n, opts,newFlist;
     opts := [args[3 .. nargs]];
     if type(r1, range) then
         if not hasoption(opts, 'numpoints', 'n', 'opts')
         then n := 25
         end if; 
         m := nops(Flist);
         p := seq(plot3d(extend(Flist[i]), r1, (i-1) .. i,
                                  grid=[n, 2], op(opts)),
                       i = 1 .. m):
         plots[display](p):
     else
       newFlist := map(unapply, Flist, lhs(r1));
     opts := ['labels'=[lhs(r1), " "," "],
                 args[3 .. nargs]];
    ribbonplot5(newFlist,rhs(r1),op(opts)):
   end if:
end proc:
ribbonplot5([cos, sin, cos + sin], -Pi .. Pi,numpoints=20);
1 2 3 4 5 6 7 Last Page 1 of 1878