Maple 16 Questions and Posts

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

How do I draw three graphs on the same axis of coordinates and I see this graph appear after the previous graph one second with the Maple command? Example : y = x, y = x2, y = 1 - x.

Thanks so much for the help of everyone!

Lecture 4 - Problem 2
a)
> a := -2100; b := 2100; N := 8; h := (b-a)/N; C := 4491; x := [seq(h, h = -2100 .. 2100, h)]; y := proc (x) options operator, arrow; sqrt(1+((1/2)*exp(x/C)-(1/2)*exp(-x/C))^2) end proc; evalf(y(x[1])); evalf(y(x[N+1])); L := (1/3)*h*(y(x[1])+4*(y(x[2])+y(x[4])+y(x[6])+y(x[N]))+2*(y(x[3])+y(x[5])+y(x[N-1]))+y(x[N+1])); evalf(L);
                             -2100
                              2100
                               8
                              525
                              4491
     [-2100, -1575, -1050, -525, 0, 525, 1050, 1575, 2100]
         /                           2\
         |    /1    /x\   1    /  x\\ |
x -> sqrt|1 + |- exp|-| - - exp|- -|| |
         \    \2    \C/   2    \  C// /
                          1.111332350
                          1.111332350
                                           (1/2)
         /                               2\    
         |    /1    /-700\   1    /700 \\ |    
     175 |1 + |- exp|----| - - exp|----|| |    
         \    \2    \1497/   2    \1497// /     

                                               (1/2)
              /                              2\    
              |    /1    /-175\   1    /175\\ |    
        + 700 |1 + |- exp|----| - - exp|---|| |    
              \    \2    \499 /   2    \499// /     

                                                (1/2)
              /                               2\    
              |    /1    /-175\   1    /175 \\ |    
        + 700 |1 + |- exp|----| - - exp|----|| |    
              \    \2    \1497/   2    \1497// /     

                                                (1/2)
              /                               2\    
              |    /1    /175 \   1    /-175\\ |    
        + 700 |1 + |- exp|----| - - exp|----|| |    
              \    \2    \1497/   2    \1497// /     

                                               (1/2)
              /                              2\    
              |    /1    /175\   1    /-175\\ |    
        + 700 |1 + |- exp|---| - - exp|----|| |    
              \    \2    \499/   2    \499 // /     

                                                (1/2)     
              /                               2\          
              |    /1    /-350\   1    /350 \\ |          
        + 350 |1 + |- exp|----| - - exp|----|| |      + 350
              \    \2    \1497/   2    \1497// /           

                                                (1/2)
              /                               2\    
              |    /1    /350 \   1    /-350\\ |    
        + 350 |1 + |- exp|----| - - exp|----|| |    
              \    \2    \1497/   2    \1497// /     

                                                (1/2)
              /                               2\    
              |    /1    /700 \   1    /-700\\ |    
        + 175 |1 + |- exp|----| - - exp|----|| |    
              \    \2    \1497/   2    \1497// /    
                          4354.742601
> L := (1/3)*h*(y(x[1])+4*add(y(i), i = y(x[2]) .. y(x[N]), 2)+2*add(y(i), i = y(x[3]) .. y(x[N-1]), 2)+y(x[N+1])); evalf(L);
Error, invalid input: add expects 2 arguments, but received 3
                          4354.742601

I am trying to compare time taken in minutes for each iterative model(Jacobi, Gauss-Seidel and SOR) to complete, so as to figure out the iterativre model with a faster time of convergence but i don't know the command to initiate.

Anyone can help me to convert the following maple solution expressed by the hypergeom function to the LegendreP(n,b,x) or Q function?


 

restart

with(PDETools):

infolevel[pdsolve] := 3:

sol[1] := dsolve((1-x^2)*(diff(y(x), x, x))+n(n+1)*y(x) = 0)

y(x) = _C1*(-1+x^2)*hypergeom([3/4+(1/4)*(4*n(n+1)+1)^(1/2), 3/4-(1/4)*(4*n(n+1)+1)^(1/2)], [1/2], x^2)+_C2*(x^3-x)*hypergeom([5/4+(1/4)*(4*n(n+1)+1)^(1/2), 5/4-(1/4)*(4*n(n+1)+1)^(1/2)], [3/2], x^2)

(1)

convert(sol[1], LegendreP)

y(x) = _C1*(-1+x^2)*hypergeom([3/4+(1/4)*(4*n(n+1)+1)^(1/2), 3/4-(1/4)*(4*n(n+1)+1)^(1/2)], [1/2], x^2)+_C2*(x^3-x)*hypergeom([5/4+(1/4)*(4*n(n+1)+1)^(1/2), 5/4-(1/4)*(4*n(n+1)+1)^(1/2)], [3/2], x^2)

(2)

``

 

Download convert-Legendre.mw

 

https://math.stackexchange.com/questions/3254765/how-to-convert-a-hypergeom-function-to-the-legendre-function

I just want y(x) to be expressed in the form of LegendreP(n,b,x).

i have a assignment problem to optimize with 1200 variables and almost 1000 constraints. but maple couldnt solve it. anyone who can help me is welcome

or may i try another app?

thanks

this is the my model
tam2.mw

 

restart;

 

 

we:=[1,2,8,9,15,16,22,23,29,30];

(1)

wd:=[3,4,5,6,7,10,11,12,13,14,17,18,19,20,21,24,25,26,27,28];

(2)

#printlevel :=3;

for j from 1 to 30 do
#her gündüz vardiyasında en az 4 hemşire bulunsun
a[j]:=sum(x[i][j][1], i=1..20)>=4:
end do;

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(3)

A := [seq(a[j],j=1..30)];

(4)

#her gece vardiyasında en az 4 hemşire bulunsun
for j from 1 to 30 do
b[j]:=sum(x[i][j][2], i=1..20)>=4:
end do;

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(5)

 

B := [seq(b[j],j=1..30)];

(6)

#her hemşire ayda en az 4 hafta içi gündüz vardiyasında çalışsın
for i from 1 to 20 do
c[i]:=sum(x[i][wd[k]][1], k=1..20)>=4:
end do;

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(7)

C := [seq(c[i],i=1..20)];

(8)

#her hemşire ayda en az 4 hafta içi gece vardiyasında çalışsın
for i from 1 to 20 do
d[i]:=sum(x[i][wd[k]][2], k=1..20)>=4:
end do;

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(9)

dd:= [seq(d[i],i=1..20)];

(10)

#her hemşire ayda en az 2 hafta sonu gündüz vardiyasında çalışsın
for i from 1 to 20 do
e[i]:=sum(x[i][we[k]][1], k=1..10)>=2;
end do;

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(11)

E:= [seq(e[i],i=1..20)];

(12)

#her hemşire ayda en az 2 hafta sonu gece vardiyasında çalışsın
for i from 1 to 20 do
f[i]:=sum(x[i][we[k]][2], k=1..10)>=2;
end do;

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(13)

F:= [seq(f[i],i=1..20)];

(14)

#gece vardiyasında çalışan hemşire ertesi gündüz ve gece vardiyalarında izinlidir
for i from 1 to 20 do
for j from 1 to 29 do
g[i][j]:=2*x[i][j][2]+x[i][j+1][1]+x[i][j+1][2]<=2
end do;
end do;

for i from 1 to 20 do
g[i] := seq(g[i][j],j=1..29)
end do;

g:= [seq(g[i],i=1..20)];

with(Optimization);

Minimize( sum(t[m], m=1..20),{A[],B[],C[],dd[],E[],F[],g[]}, assume = binary );


 

Download tam2.mw

 

I need help on solving the following PDE by Maple:

https://math.stackexchange.com/questions/3177491/how-to-solve-the-given-partial-differential-equation

I couldn't write the partial differential equation in Mapleprimes so provided the link from somewhere else. Please help. Thank you.

Hi guys,

This is the first time of solving partial differential equation, can some please help me point out some errows in my code. 
 

restart

ODEs := `<,>`(diff(v(y), y, y)+(diff(v(y), y))/y-(Ha^2/(1-eta)^2+1/y^2)*v(y)-Re*v(y)*(diff(v(y), y)) = 0, diff(theta(y), y, y)+Ec*Pr*(diff(v(y), y)-v(y)/y)^2-Pr*Re*v(y)*(diff(theta(y), y))+Nb*(diff(theta(y), y))*(diff(phi(y), y))+Nt*(diff(theta(y), y))^2 = 0, diff(phi(y), y, y)-Re*Sc*v(y)*(diff(phi(y), y))+Nt*(diff(theta(y), y, y)+(diff(theta(y), y))/y)/Nb = 0)

ODEs := Matrix(3, 1, {(1, 1) = diff(diff(v(y), y), y)+(diff(v(y), y))/y-(Ha^2/(1-eta)^2+1/y^2)*v(y)-Re*v(y)*(diff(v(y), y)) = 0, (2, 1) = diff(diff(theta(y), y), y)+Ec*Pr*(diff(v(y), y)-v(y)/y)^2-Pr*Re*v(y)*(diff(theta(y), y))+Nb*(diff(theta(y), y))*(diff(phi(y), y))+Nt*(diff(theta(y), y))^2 = 0, (3, 1) = diff(diff(phi(y), y), y)-Re*Sc*v(y)*(diff(phi(y), y))+Nt*(diff(diff(theta(y), y), y)+(diff(theta(y), y))/y)/Nb = 0})

(1)

BCs := `<,>`(phi(eta) = 1, v(eta) = 1, theta(eta) = 1, phi(1) = 0, theta(1) = 0, v(1) = 0)

BCs := Matrix(6, 1, {(1, 1) = phi(eta) = 1, (2, 1) = v(eta) = 1, (3, 1) = theta(eta) = 1, (4, 1) = phi(1) = 0, (5, 1) = theta(1) = 0, (6, 1) = v(1) = 0})

(2)

param_names := [eta, Ha, Ec, Nt, Nb, Re, Sc, Pr];

[eta, Ha, Ec, Nt, Nb, Re, Sc, Pr]

(3)

pdSolve := subs(_P = param_names, proc ({ eta::realcons := .5, Ha::realcons := 1, Sc::realcons := .8, Nt::realcons := .1, Nb::realcons := .1, Re::realcons := 2, Ec::realcons := 0.1e-1, Pr::realcons := 10 }) userinfo(1, Solve, `~`[`=`](param_names, _P)); dsolve(eval(`union`(convert(ODEs, set), convert(BCs, set)), `~`[`=`](param_names, _P)), numeric) end proc);

proc ({ Ec::realcons := 0.1e-1, Ha::realcons := 1, Nb::realcons := .1, Nt::realcons := .1, Pr::realcons := 10, Re::realcons := 2, Sc::realcons := .8, eta::realcons := .5 }) userinfo(1, Solve, `~`[`=`](param_names, [eta, Ha, Ec, Nt, Nb, Re, Sc, Pr])); dsolve(eval(`union`(convert(ODEs, set), convert(BCs, set)), `~`[`=`](param_names, [eta, Ha, Ec, Nt, Nb, Re, Sc, Pr])), numeric) end proc

(4)

infolevel[Solve] := 1:

Fig. 3 (changing values of Ha):

P:= Ha:
vals:= [1, 5, 10, 20]:
sols:= [seq(Solve(P= v), v= vals)]:
colors:= [red, green, blue]:
for F in [v,theta,phi](y) do
   print(plots:-display(
      [seq(
         plots:-odeplot(sols[k], [y,F], color= colors[k], legend= [P= vals[k]]),
         k= 1..nops(vals)
      )],
      labeldirections= [horizontal,vertical]
   ))
od:

Error, pdeplot is not a command in the plots package

 

``


 

Download chapter5.mw

 

i have a problem to solve this system ?

Hello,

I will explain my problem on a simple function and some data.

mg:=78.54*7.85*1e-9*1000*9.81;l:=10000;l0:=12000;h:=0;H := 28.399;
eta:=mg*l/(2*H);
zeta:=arcsinh(mg*h/(2*H*sinh(eta)))-eta;
z:=H/mg*(cosh(mg/H*x+zeta)-cosh(zeta));
plot(z,x=0..l);

Above is a definition of an initial plot. Now I would like to draw a new plot in which every x coordinate is shifted horizontally by a function:

deltax:=H*arcsinh(x)-x;

As you see I can't use translate or scale so I've tried to use a transform function but I can't do it the right way.

I would be grateful for any ideas.

 

Greetings,

Iza

Hei!

In my Maple project I want to put a simple sin graph on top of an image. But how do I create a background image with a graph on top?

I'm start making an homepage about mathematic and wondt to link a workpage writen in Maple 16 into WP, thanks to whose ho have any idea :)

 

Helo, guys, i am a beginner here I want solve a system of first order differential equation using RK4. Please I need help please.

I am getting this error for pretty much everything now, i am using maple 16, and there literally is no way i will be able to buy a newer version considering

restart

latex(alpha, beta)

Error, (in latex) permission denied: no write access (C:\Users\the_r\Desktop\MAPLE_DOCS\NUMBER_THEORY\IDENTITY_INVESTIGATION_ARCHIVE_SYSTEM\beta)

 

``


 

Download mapleHELP.mw

PDE := diff(u(x, y), x, x)+diff(u(x, y), y, y)-6*x*y*(1-y)-2*x^3 = 0; BCsx := u(xL, y) = 0, u(xU, y) = y*(1-y); BCsy := u(x, yL) = 0, u(x, yU) = 0; solPDE := pdsolve({BCsx, BCsy, PDE}, u(x, y)); exactSol := unapply(rhs(%), x, y)

I am getting this error for almost everything that i write in maple today, and i simply have no idea what causes it or what it means

 


 

"?SetOfCommonDivisors:=(X,Y)->{[[1,X intersect (map(numtheory:-divisors, Y))<>{???}],[0,otherwise]]??"

Error, unable to parse 'mverbatim'

"?SetOfCommonDivisors:=(X,Y)->{[[1,X intersect (map(numtheory:-divisors, Y))<>{???}],[0,otherwise]]??"

 

``


 

Download WTF_ERROR.mw

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