Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

eval.mw This is the maple worksheet The regions are u<=-1, -1<=u<=1,u>=1

how to write 

-a2/3 + a3 - (2*a4)/3 - (2*a5)/3

into the form 

-(-3*a3 + a2 + 2*a4 + 2*a5)/2

No simplify works. Please help. 

 

test.mw

How to collect the coefficient of epsilon^(1/2) from A.

Actually, I want to write A as A=c1*epsilon^(1/2) +c2*epsilon+c3*epsilon^(3/2)

How to do that? My collect command failed to do this. 

A:=-epsilon^(3/2)*a2^3/4 - (5*epsilon^(3/2)*a4^3)/3 - (5*epsilon^(3/2)*a5^3)/3 + a3*sqrt(epsilon) - sqrt(epsilon)*a2/3 - (2*sqrt(epsilon)*a4)/3 - (2*sqrt(epsilon)*a5)/3 - (5*epsilon^(3/2)*a2)/36 + (5*epsilon^(3/2)*a4)/9 + (5*epsilon^(3/2)*a5)/9 + epsilon/12 + (4*epsilon^(3/2)*a2*a4*a5)/3 - (7*epsilon^(3/2)*a2*a3*a4)/12 - (7*epsilon^(3/2)*a2*a3*a5)/12 + 5*epsilon^(3/2)*a3*a4*a5 - (3*epsilon^(3/2)*a2^2*a4)/4 - (3*epsilon^(3/2)*a2^2*a5)/4 + (2*epsilon^(3/2)*a2*a4^2)/3 + (2*epsilon^(3/2)*a2*a5^2)/3 - 5*epsilon^(3/2)*a4^2*a5 - 5*epsilon^(3/2)*a4*a5^2 + epsilon^(3/2)*a2^2*a3/12 + (5*epsilon^(3/2)*a3*a4^2)/2 + (5*epsilon^(3/2)*a3*a5^2)/2

Kindly help me , Thank you in advance

  
 

  restart:Digits:=100:

  ODES := diff(f(eta), eta)*diff(f(eta), eta$2)+X*diff(f(eta), eta)+Gr*(theta(eta))+Gc*(phi(eta))-M*(S*g(eta)-f(eta))-2*(S)*diff(f(eta), eta) = 0,
          diff(theta(eta), eta$2)-2*Pr*(S)*(diff(theta(eta), eta))+Pr*Ec*(diff(f(eta), eta))^2+Pr*Df*(diff(phi(eta), eta$2)) = 0,
           diff(phi(eta), eta$2)-2*Sc*(S)*(diff(phi(eta), eta))-K*phi(eta)+Sr*diff(theta(eta), eta$2)=0, R^2*diff(g(eta), eta$2)+P*diff(f(eta), eta)-2*R*P*(S)*diff(g(eta), eta)=0;

(diff(f(eta), eta))*(diff(diff(f(eta), eta), eta))+X*(diff(f(eta), eta))+Gr*theta(eta)+Gc*phi(eta)-M*(S*g(eta)-f(eta))-2*S*(diff(f(eta), eta)) = 0, diff(diff(theta(eta), eta), eta)-2*Pr*S*(diff(theta(eta), eta))+Pr*Ec*(diff(f(eta), eta))^2+Pr*Df*(diff(diff(phi(eta), eta), eta)) = 0, diff(diff(phi(eta), eta), eta)-2*Sc*S*(diff(phi(eta), eta))-K*phi(eta)+Sr*(diff(diff(theta(eta), eta), eta)) = 0, R^2*(diff(diff(g(eta), eta), eta))+P*(diff(f(eta), eta))-2*R*P*S*(diff(g(eta), eta)) = 0

(1)

  bcs:= f(0) = 0,
        f(1) = 1,
        g(0) = 0,
        g(1) = 1,
        theta(0) = 0,
        theta(1) = 1,
        phi(0) = 0,
        phi(1) = 1

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

(2)

  params:=[ Sc = 0.22,  Pr = 0.71,S=1,K=0.5,Sr=2,Df=2,X=2,
            Gr=10,Gc=10,M=0.4,R=6,P=3,Ec=0.22
          ];

[Sc = .22, Pr = .71, S = 1, K = .5, Sr = 2, Df = 2, X = 2, Gr = 10, Gc = 10, M = .4, R = 6, P = 3, Ec = .22]

(3)

  phiVals:=[0.01, 0.1, 0.2, 1]:
  Mvals:= [3, 5, 7, 9]:
  ans:=Matrix( numelems(Mvals)*numelems(phiVals)+1, 5):
  ans[1,..]:= < 'M' | 'phi' | expr1 | expr2 |expr3>:
  for k from 1 by 1 to 4 do
      mv:= Mvals[k]:
      for j from 1 by 1 to 4 do
          pVal:=phiVals[j]:
          sol:=dsolve( eval([ODES, bcs], params), numeric,method=bvp[middefer]);
          ans[3*(k-1)+j+1,..]:= < mv |
                                  pVal |
                                  R__e^(-0.5)*sh= eval( -diff(phi(eta), eta), [sol[], params[]])(0) |
                                  R__e^(-0.5)*NU= eval( diff(theta(eta), eta),[sol[], params[]])(0) |
                                  R__e^(0.5)*C[f]=eval( diff(f(eta), eta,eta), [sol[], params[]])(0)
                                >;
      od:
  od:
  ans;

Error, (in dsolve/numeric/BVPSolve) initial Newton iteration is not converging

 

_rtable[36893490059830331500]

(4)

for k from 1 by 1 to 3 do
      plot( [ seq( [ seq( [ans[j,1], rhs(ans[j,2+k]) ], j=i..10,3 ) ], i=2..4 ) ],
            color=[red, green, blue],
            labels=[typeset(M), typeset( lhs(ans[2,2+k]) )],
            labelfont=[times, bold, 20],
            legend=[typeset(phi=0.01),typeset(phi=0.1),typeset(phi=0.2)],
            legendstyle=[font=[times, bold, 20]],
            title=typeset( ans[1,2+k], " versus ", M, " parameterized by ", phi),
            titlefont=[times, bold, 24]
          )
 od;

Error, invalid input: rhs received 0, which is not valid for its 1st argument, expr

 

sol:=dsolve( eval([ ODES, bcs], params), numeric);

Error, (in dsolve/numeric/bvp) initial Newton iteration is not converging

 

plots:-odeplot( sol,
                [ [eta, theta(eta)],
                  [eta, phi(eta)],
                  [eta, f(eta)]
                ],
                eta=0..10,
                color=[red, green, blue]
              );

Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

 

 


Download JMWISE.mw

Kindly help me , Thank you in advance.

 Kind help Please It will be acknownoleged please please help

The conditions given the below PDF file link Please help it will be greatly acknowleged

to_maple.pdf

Hello im an amateur using maple for my hidraulics machines course at engineering school. Does anyone know how to use the degrees package on maple 2021, i called it out by using the short form. with(Degrees): and then try to use sind but it doesnt recognice the command.

Also when using RPMs the units that should be giving me m/s appear as m2/m*s(radious). I know that the software recognice it as angular speed but is there anyway to eliminate the (radious) so i can work with the speed as lineal?

It says the outpur is too long to display

 

We have the system with one discrete variable along x-axis (i.e. 'i' is discrete in the attached file) and other variable 't' is continuous. But maple return error.

CD.mw

Good day everyone,

Please, I need help on how to optimize the function above. I actually wanted to plot the function with respect to "eta", but, I need the optimum value(s) for "alpha". Anyone with useful information should please help.

Thanking you in anticipation for your help.                                                             f=((-0.111000111e-1*alpha^4+.109890109900000*alpha^3+0.110726700000000e-1*alpha^2+0.133899904900000e-3*alpha+0.136700000000000e-4)*exp(-alpha*eta)+(-0.683733733e-5+0.683733733e-5*alpha^2-0.676896396e-4*alpha)*exp(-2*alpha*eta)+0.111000111e-1*alpha^4-.109890109900000*alpha^3-0.110794990900000e-1*alpha^2-0.663221721200000e-4*alpha-0.683733733200000e-5)/(.1*alpha^5-.99*alpha^4-.1*alpha^3)

how to plot multivalued function in the region from  -a to a solving 2nd order ode in maple ?

d^x/du^2+1/2sech^2(u)*x(u)=0  . I have to find out the analytical value in three different regions like u<=-a , -a<=u<=a , u>=a . How to find out ? 

with(geometry):
_EnvHorizontalName := x:
_EnvVerticalName := y:
a := 7:
b := a*(1/2 + 1/6*sqrt(45 - 24*sqrt(3)))^2:
r := b*sqrt(b)/(sqrt(a + b) + sqrt(a)):
point(A, -a, b): point(B, -a, -b):
point(C, a, -c): point(F, a, b):
Sq := square(Sq, [A, B, C, F]):
circle(C1, [point(P1, [r, 0]), r]):
circle(C2, [point(P2, [(1 + sqrt(3))*r, r]), r]):
circle(C3, [point(P3, [(1 + sqrt(3))*r, -r]), r]):
ellipse(E, x^2/a^2 + y^2/b^2 = 1, [x, y]):
solve({Equation(C1), x^2/a^2 + y^2/b^2 = 1}, {x, y}):
point(T, [5.349255162, 2.829908743]):
IsOnCircle(T, C1);
draw([E(color = cyan), C1(color = yellow, filled = true), T(symbol = solidcircle, symbolsize = 20, color = red), Sq, C2(color = red), C3(color = red),Sq(color=blue)], axes = normal, view = [-a .. a, -b .. b], scaling = constrained);
square: (196+(7*(1/2+(1/6)*(45-24*3^(1/2))^(1/2))^2+c)^2)^(1/2)-(196+196*(1/2+(1/6)*(45-24*3^(1/2))^(1/2))^4)^(1/2) = 0
square: (7/2)*(1/2+(1/6)*(45-24*3^(1/2))^(1/2))^2-(1/2)*c = 0
Error, (in geometry:-square) not enough information to define a square
                             false

Error, (in geometry:-draw) cannot determine the vertices for drawing .Why all these errors ? Thank you.

Dear all

i am a very new user of Maple. 
is there an equivalent Mathematica function of

Transpose@Partition[BinaryReadList["Namefile","UnsignedInteger16"],8]

thank you very much and best regards

bruno

I'm seeking a way to test conditional statements for truth in Maple (2022).

The statements are like (\phi^2 > 2) implies (\phi > 1.4)

1) how can I input such kind of statements?

2) how can I get a result in form true/false

  a) for entire expression

  b) (depending on phi range)

Does anyone use the /= assignment operator?

I am trying to do a

while error  > error_tol do

sequence of ops,

# update error from last loop
# simple example of assignment test 

error /= 2;    #to simulate decreasing error each loop.  Real equation on RHS is error(i) = error(i-1) + comparison of last iterates.

# Real operator assignment I'd like to use is error += comparison

end do;

the divide / keeps applying as the single divide and a long line under the variable before I can type =.   This happens in both 1-D and 2-D.   The "Operator Assignments" help page doesn't have a lot of help on syntax problems using these. 

Thanks,
Bill

I am trying to find a fast method for integration of a function composed of several Heavisides. I used Quadrature-Romberg, but no success. What is the problem with it and what method do you recommend instead?

``

restart

``

A := Heaviside(zeta__2-.6429162216568)*Heaviside(eta__2+.5050000000000-10.98537767108*sqrt(492.5151416233-zeta__2^2))+Heaviside(zeta__2-.9999999999936)*Heaviside(eta__2+.9875792458758+3.881485663812*10^9*sqrt(9.765625000000*10^22-zeta__2^2))+Heaviside(zeta__2+1.000000000000)*Heaviside(eta__2-.4637698986762+2.327456686822*10^11*sqrt(2.777777777778*10^24-zeta__2^2))-Heaviside(zeta__2+1.000000000000)*Heaviside(eta__2-.4637698986762-2.327456686822*10^11*sqrt(2.777777777778*10^24-zeta__2^2))+Heaviside(zeta__2+1.000000000000)*Heaviside(eta__2+.1619291800251+3.018371923484*10^11*sqrt(4.000000000000*10^24-zeta__2^2))-Heaviside(zeta__2+1.000000000000)*Heaviside(eta__2+.1619291800251-3.018371923484*10^11*sqrt(4.000000000000*10^24-zeta__2^2))+Heaviside(zeta__2+1.000000000000)*Heaviside(eta__2+.7243706106403+1.382194833711*10^11*sqrt(1.562500000000*10^24-zeta__2^2))-Heaviside(zeta__2+1.000000000000)*Heaviside(eta__2+.7243706106403-1.382194833711*10^11*sqrt(1.562500000000*10^24-zeta__2^2))+Heaviside(zeta__2-1.000000000000)*Heaviside(eta__2+.9875792458758-3.881485663812*10^9*sqrt(9.765625000000*10^22-zeta__2^2))-Heaviside(zeta__2-1.000000000000)*Heaviside(eta__2+.9875792458758+3.881485663812*10^9*sqrt(9.765625000000*10^22-zeta__2^2))+Heaviside(zeta__2-1.000000000000)*Heaviside(eta__2-.8341191288491-1.298592148442*10^10*sqrt(9.706617486471*10^21-zeta__2^2))-Heaviside(zeta__2-1.000000000000)*Heaviside(eta__2-.8341191288491+1.298592148442*10^10*sqrt(9.706617486471*10^21-zeta__2^2))-Heaviside(zeta__2-.9999999999796)*Heaviside(eta__2-.8341191288491-1.298592148442*10^10*sqrt(9.706617486471*10^21-zeta__2^2))-Heaviside(zeta__2-.5527964251744)*Heaviside(eta__2+.5050000000000-10.98537767108*sqrt(492.5151416233-zeta__2^2))+Heaviside(zeta__2-.5527964251744)*Heaviside(eta__2+.5050000000000+10.98537767108*sqrt(492.5151416233-zeta__2^2))+Heaviside(zeta__2-.7684252323012)*Heaviside(eta__2-.5050000000000-8.127372424924*sqrt(269.5813999936-zeta__2^2))-Heaviside(zeta__2-.6466146460206)*Heaviside(eta__2-.5050000000000-8.127372424924*sqrt(269.5813999936-zeta__2^2))-Heaviside(zeta__2-.7684252323012)*Heaviside(eta__2-.5050000000000+8.127372424924*sqrt(269.5813999936-zeta__2^2))+Heaviside(zeta__2-.6466146460206)*Heaviside(eta__2-.5050000000000+8.127372424924*sqrt(269.5813999936-zeta__2^2))-Heaviside(zeta__2-.9999999999936)*Heaviside(eta__2+.9875792458758-3.881485663812*10^9*sqrt(9.765625000000*10^22-zeta__2^2))+Heaviside(zeta__2-.9999999999796)*Heaviside(eta__2-.8341191288491+1.298592148442*10^10*sqrt(9.706617486471*10^21-zeta__2^2))+Heaviside(zeta__2+.9999999999972)*Heaviside(eta__2+.9842650870048-1.085166413462*10^10*sqrt(4.756242568371*10^23-zeta__2^2))-Heaviside(zeta__2+.9999999999972)*Heaviside(eta__2+.9842650870048+1.085166413462*10^10*sqrt(4.756242568371*10^23-zeta__2^2))+Heaviside(zeta__2+.9999999999990)*Heaviside(eta__2+.1619291800251-3.018371923484*10^11*sqrt(4.000000000000*10^24-zeta__2^2))-Heaviside(zeta__2+.9999999999990)*Heaviside(eta__2+.1619291800251+3.018371923484*10^11*sqrt(4.000000000000*10^24-zeta__2^2))+Heaviside(zeta__2+.9999999999988)*Heaviside(eta__2-.4637698986762-2.327456686822*10^11*sqrt(2.777777777778*10^24-zeta__2^2))-Heaviside(zeta__2+.9999999999988)*Heaviside(eta__2-.4637698986762+2.327456686822*10^11*sqrt(2.777777777778*10^24-zeta__2^2))+Heaviside(zeta__2+.9999999999984)*Heaviside(eta__2+.7243706106403-1.382194833711*10^11*sqrt(1.562500000000*10^24-zeta__2^2))-Heaviside(zeta__2+.9999999999984)*Heaviside(eta__2+.7243706106403+1.382194833711*10^11*sqrt(1.562500000000*10^24-zeta__2^2))+Heaviside(zeta__2+.9999999999984)*Heaviside(eta__2-.9031048925918-8.123652892875*10^10*sqrt(1.562500000000*10^24-zeta__2^2))-Heaviside(zeta__2+.9999999999984)*Heaviside(eta__2-.9031048925918+8.123652892875*10^10*sqrt(1.562500000000*10^24-zeta__2^2))-Heaviside(zeta__2+1.000000000000)*Heaviside(eta__2+.9842650870048-1.085166413462*10^10*sqrt(4.756242568371*10^23-zeta__2^2))+Heaviside(zeta__2+1.000000000000)*Heaviside(eta__2+.9842650870048+1.085166413462*10^10*sqrt(4.756242568371*10^23-zeta__2^2))-Heaviside(zeta__2-.6429162216568)*Heaviside(eta__2+.5050000000000+10.98537767108*sqrt(492.5151416233-zeta__2^2))-Heaviside(zeta__2+1.000000000000)*Heaviside(eta__2-.9031048925918-8.123652892875*10^10*sqrt(1.562500000000*10^24-zeta__2^2))+Heaviside(zeta__2+1.000000000000)*Heaviside(eta__2-.9031048925918+8.123652892875*10^10*sqrt(1.562500000000*10^24-zeta__2^2)):

plot3d(A, zeta__2 = -1 .. 1, eta__2 = -1 .. 1, color = green)

 

Digits := 22:

with(Student[NumericalAnalysis]):

Quadrature(Quadrature(A, zeta__2 = -1 .. 1, method = romberg[8]), eta__4 = -1 .. 1, method = romberg[8])

Float(undefined)*Heaviside(eta__2+1212964270000000000001.)+Float(undefined)*Heaviside(eta__2-1279401131003415700657.)-0.1513022270849353690226e-1*Heaviside(eta__2-133.8411610374164929382)+Float(undefined)*Heaviside(eta__2-7483906296259851792359.)+Float(undefined)*Heaviside(eta__2+7483906296259851792361.)+Float(undefined)*Heaviside(eta__2-0.1015456611625000000000e24)+Float(undefined)*Heaviside(eta__2+0.1015456611625000000000e24)+Float(undefined)*Heaviside(eta__2+0.3879094478488497112464e24)+Float(undefined)*Heaviside(eta__2+1279401131003415700655.)-0.4538512794872905686682e-1*Heaviside(eta__2-133.8360207224718595497)+0.4538512794872905686682e-1*Heaviside(eta__2+132.8260207224718595497)+0.4538512794872905686682e-1*Heaviside(eta__2+132.8042477794001150390)-0.4538512794872905686682e-1*Heaviside(eta__2-133.8253766167816064928)-0.4538512794872905686682e-1*Heaviside(eta__2-243.1883998382669648802)+0.1513022270849353690226e-1*Heaviside(eta__2+132.8311610374164929382)+Float(undefined)*Heaviside(eta__2-0.1727743542500000000000e24)-0.1513022270849353690226e-1*Heaviside(eta__2-243.2027260661341424950)+0.1513022270849353690226e-1*Heaviside(eta__2+244.2127260661341424950)+0.4538512794872905686682e-1*Heaviside(eta__2+244.1983998382669648802)-0.4538512794872905686682e-1*Heaviside(eta__2-243.1980716456433769010)+0.4538512794872905686682e-1*Heaviside(eta__2+244.2080716456433769010)+0.4538512794872905686682e-1*Heaviside(eta__2+132.8153766167816064928)+0.1513022270849353690226e-1*Heaviside(eta__2+132.8098727970154075001)+Float(undefined)*Heaviside(eta__2-0.3879094478488497112464e24)-0.4538512794872905686682e-1*Heaviside(eta__2-243.2072595071292620415)+Float(undefined)*Heaviside(eta__2+0.6036743846000000000000e24)+Float(undefined)*Heaviside(eta__2-0.6036743846000000000000e24)+Float(undefined)*Heaviside(eta__2+0.1727743542500000000000e24)-0.1916322521366165064753e-1*Heaviside(eta__2-133.8307592537082147847)+0.1916322521366165064753e-1*Heaviside(eta__2+132.8207592537082147847)-0.1916322521366165064753e-1*Heaviside(eta__2-243.2116719753798543789)+0.1916322521366165064753e-1*Heaviside(eta__2+244.2216719753798543789)-0.4538512794872905686682e-1*Heaviside(eta__2-133.8026340889186250133)+0.4538512794872905686682e-1*Heaviside(eta__2+132.7926340889186250133)-0.4538512794872905686682e-1*Heaviside(eta__2-133.8142477794001150390)-0.1513022270849353690226e-1*Heaviside(eta__2-133.8198727970154075001)+0.4538512794872905686682e-1*Heaviside(eta__2+244.2172595071292620415)-0.1903631769101229216919e-1*Heaviside(eta__2-133.8085015485931455736)+0.1903631769101229216919e-1*Heaviside(eta__2+132.7985015485931455736)+0.1903531841918040745676e-1*Heaviside(eta__2+244.2032962387251632874)-0.1903531841918040745676e-1*Heaviside(eta__2-243.1932962387251632874)+Float(undefined)*Heaviside(eta__2-1212964269999999999999.)

(1)

int(int(A, zeta__2 = -1 .. 1), eta__2 = -1 .. 1)

.4238607655960000000000

(2)

``

Download romberg.mw

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