acer

32333 Reputation

29 Badges

19 years, 326 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by acer

The simplification that you are expecting is not generally valid. It is not generally valid when Z<0 . That's why Maple is not combining those powers without special direction.

The symbolic option to the simplify command instructs it to ignore such branch cut distinctions. I prefer to provide the special directions in the form of assumptions, so that it's more clear to me just what circumstances are supposed to be allowed. (Of course I still have to be careful about respecting those assumptions.)

For example,

ee := Z^3 / ((Z^2)^(2/3));

Z^3/(Z^2)^(2/3)

ff := simplify(ee, symbolic);

Z^(5/3)

evalf( eval( ee, Z=-1 ) );

-1.

evalf( eval( ff, Z=-1 ) );

.5000000001-.8660254037*I

simplify(ee) assuming Z>=0;

Z^(5/3)

 

Download radsimp.mw

For your posted example you could do one of,

simplify(combine(req)) assuming positive;

simplify(combine(req),symbolic);

restart;

zform := op(solve({z>0, x^2+z^2=y^2}, z)) assuming x>0, y>0, z>0;

z = (-x^2+y^2)^(1/2)

P := x+y = 60;

x+y = 60

yform := isolate(P,y);

y = 60-x

eval(zform, yform);

z = (-x^2+(60-x)^2)^(1/2)

Area := 1/2*x*z;

(1/2)*x*z

Texpr := eval(Area, eval(zform, yform));

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

T := unapply( Texpr, x);

proc (x) options operator, arrow; (1/2)*x*(-x^2+(60-x)^2)^(1/2) end proc

# approach using operator form, T
xsol := solve(diff(T(x), x)=0);

20

T(20);

10*1200^(1/2)

T(xsol);

10*1200^(1/2)

# approach using expression form, Texpr
xsol := solve(diff(Texpr, x)=0);

20

eval(Texpr, x=20);

10*1200^(1/2)

eval(Texpr, x=xsol);

10*1200^(1/2)

 

Download areaprob.mw

The phi obtained from GetProperty(EQUATION1, expression) is the unassigned global name phi, not numtheory[phi].

I don't know whether you want to rethink your definition of FTest.

MAPLE_PLEASE_HELP_aGAIN_ac.mw

How about considering it as an integral over y=-1..1, ie,

int( 2-y^2 - y, y=-1 .. 1);

                       10/3

The above is a bit easier than splitting the domain at x=1 and adding the two portions, while integrating over x=-1..2.

int(x-(-1), x=-1..1) + int(sqrt(2-x)-(-sqrt(2-x)), x=1..2);

                       10/3

I'm supposing that you have realized that the first step is to solve for the upper point where the curves intersect, since that gives you information about the bounds of integration.

solve(y = 2-y^2, {y});

                {y = 1}, {y = -2}

@mpre 

restart;

kernelopts(version);
   Maple 2016.2, X86 64 LINUX, Jan 13 2017, Build ID 1194701

ff:=(sqrt(1/beta)+1)*beta/(beta+sqrt(beta)):

normal(combine(expand(ff))) assuming beta>0;
                               1

evala(combine(ff)) assuming beta>0;
                               1

simplify(expand(ff), symbolic);
                               1

The expression assigned to ff is not equal to 1 for real beta<0.

It's not always easy or practical, but I usually try and avoid implicitplot3d since it has several drawbacks:

1) The surface looks very rough unless a very large number of points is used, and even then it still looks rougher than a usual plot3d surface.
2) With a large number of points manual rotation of the plot is highly problematic in the Standard GUI. Attempting a manual rotation usually means I'm going to have to wait for the GUI to pause for a minute or so.
3) With a large number of points I often have to wait a few minutes if I right-click on the plot, and sometimes the context-menu doesn't appear at all (so I can't export to .png using the GUI's drivers).
4) The plot structure doesn't actually contain data that delineates the surface, and so it is of little or no use in terms of exporting the plot data for use by a 3rd party application.

The following produces Pgrid as two conjoined surfaces produced by plot3d. It behaves reasonably for me under manual rotation and (discounting the seam at z=0) is reasonably smooth.
 

restart;

f1:=x^4+2*x^2*y^2+2*x^2*z^2+y^4+2*y^2*z^2+z^4-2*x^3
   -2*x*y^2-2*x*z^2-(79/25)*x^2-(104/25)*y^2-(8/5)*z^2+(104/25)*x:

f2:=x^4+2*x^2*y^2+2*x^2*z^2+y^4+2*y^2*z^2+z^4-2*x^2*y
   -2*y^3-2*y*z^2-(104/25)*x^2-(79/25)*y^2-(8/5)*z^2+(104/25)*y:

f3:=x^4+2*x^2*y^2+2*x^2*z^2+y^4+2*y^2*z^2+z^4+2*x^3+2*x*y^2
    +2*x*z^2-(79/25)*x^2-(104/25)*y^2-(8/5)*z^2-(104/25)*x:

f4:=x^4+2*x^2*y^2+2*x^2*z^2+y^4+2*y^2*z^2+z^4+2*x^2*y+2*y^3
    +2*y*z^2-(104/25)*x^2-(79/25)*y^2-(8/5)*z^2-(104/25)*y:

 

bnds:=[seq(solve(eval(ff,[x=0,z=0]),y),ff=[f1,f2,f3,f4])]:

F1:=solve(f1,z): F2:=solve(f2,z): F3:=solve(f3,z): F4:=solve(f4,z):

S:=[seq(solve(eval(ff,[z=0]),x),ff=[f1,f2,f3,f4])]:

spec:=1.59917: # easier to use odd y-grid sizes
Kdinner:=unapply(max(Im(F1[1]),Im(F2[1]),Im(F3[1]),Im(F4[1])),[x,y]):
Kdown:=proc(Y) option remember;
  if not type(Y,realcons) then return 'procname'(args); end if;
  if Y>spec or Y<-spec then return 0; end if;
  RootFinding:-NextZero(x->evalhf(Kdinner(x,Y)-1e-3),-3,maxdistance=3);
end proc:

Kuinner:=unapply(min(Im(F1[2]),Im(F2[2]),Im(F3[2]),Im(F4[2])),[x,y]):
Kup:=proc(Y) option remember;
  if not type(Y,realcons) then return 'procname'(args); end if;
  if Y>spec or Y<-spec then return 0; end if;
  RootFinding:-NextZero(x->evalhf(Kuinner(x,Y)+1e-3),0,maxdistance=3);
end proc:

otheropts:=scaling=constrained,
       style=surface, color=blue, lightmodel=light3, axes=box,
       orientation=[150,60,0], view=[-1.7..1.7,-1.7..1.7,-1.7..1.7]:

 

Pgrid:=plot3d([min(Re(F1[1]),Re(F2[1]),Re(F3[1]),Re(F4[1])),
               max(Re(F1[2]),Re(F2[2]),Re(F3[2]),Re(F4[2]))],
              y=min(bnds)..max(bnds), x=Kdown(y)..Kup(y),
              grid=[240,241], otheropts, title="plot3d with variable ranges"):

Pimpl:=plots:-implicitplot3d(max(f1,f2,f3,f4)=0,
                             x=-2..2, y=-2..2, z=-2..2,
                             numpoints=1000000, otheropts, title="implicitplot3d"):

plots:-display( Array([Pgrid, Pimpl]) );

 


Download impl3d_m.mw

The results embedded by DocumentTools:-Tabulate will always appear separately from any regular output (including that produced by print), if executed within the same Document Block (paragraph) or Execution Group. All the regular output will always appear together. It cannot be done exactly like you are asking, with regular output split to be partly before and partly after the tabulation.

This is because an Execution Group has just one Output area, and just one embedded Task area, and they are separate.

You might consider a different approach. Could you make those `continue` text pieces be part of the tabulation? Or are you relying on the output appearing piece by piece over time, as more intermediate results get computed?

Side note: It is wrong to have those calls to with inside the procedure body. It won't work reliably as you'd expect. If you want it inside the procedure body then either use the long name like DocumentTools:-Tabulate or change the with calls to an appropriates uses call.

The subexpression in red, containing diff(f(eta),eta,eta,eta), appears more than once in your full expression (although in one other instance it is part of a product).  I'm guessing that you want to isolate that subexpression completely, to the LHS of an equation.

If instead you only want to isolate for the single instance (in red) of that third derivative then please clarify. In that case it's a minor adjustment to define temp:=isolate(expr,S) instead.

You haven't mentioned what criteria you have for simplification of the RHS of such an equation. Do you want the numerator of the RHS to be collected according to the remaining derivatives, or just to be "small"?

Here are some ideas. I haven't tried to utilize any assumptions (eg. to combine radicals, if it might help) because you've given us no such information.

restart;

kernelopts(version);

`Maple 2015.2, X86 64 LINUX, Dec 20 2015, Build ID 1097895`

expr:=x*c*(diff(f(eta), eta))*epsilon/(-epsilon*t+1)^2+(1/2)*x*c^2*(diff(f(eta), eta, eta))*y*epsilon/((-epsilon*t+1)^3*sqrt(c/(nu*(-epsilon*t+1)))*nu)+x*c^2*(diff(f(eta), eta))^2/(-epsilon*t+1)^2-sqrt(c*nu/(-epsilon*t+1))*f(eta)*x*c*(diff(f(eta), eta, eta))*sqrt(c/(nu*(-epsilon*t+1)))/(-epsilon*t+1) = a*x*epsilon/(-epsilon*t+1)^2+a^2*x/(-epsilon*t+1)^2+x*c^2*(diff(f(eta), eta, eta, eta))/(-epsilon*t+1)^2+sqrt(2)*GAMMA*x^2*c^3*(diff(f(eta), eta, eta))*sqrt(c/(nu*(-epsilon*t+1)))*(diff(f(eta), eta, eta, eta))/(-epsilon*t+1)^3+A*g*beta[T]*theta(eta)*T[w]-A*g*beta[T]*theta(eta)*T[infinity]+A*g*beta[C]*phi(eta)*C[w]-A*g*beta[C]*phi(eta)*C[infinity]-sigma*B^2*x*c*(diff(f(eta), eta))/(rho*(-epsilon*t+1))+sigma*B^2*a*x/(rho*(-epsilon*t+1));

x*c*(diff(f(eta), eta))*epsilon/(-epsilon*t+1)^2+(1/2)*x*c^2*(diff(diff(f(eta), eta), eta))*y*epsilon/((-epsilon*t+1)^3*(c/(nu*(-epsilon*t+1)))^(1/2)*nu)+x*c^2*(diff(f(eta), eta))^2/(-epsilon*t+1)^2-(c*nu/(-epsilon*t+1))^(1/2)*f(eta)*x*c*(diff(diff(f(eta), eta), eta))*(c/(nu*(-epsilon*t+1)))^(1/2)/(-epsilon*t+1) = a*x*epsilon/(-epsilon*t+1)^2+a^2*x/(-epsilon*t+1)^2+x*c^2*(diff(diff(diff(f(eta), eta), eta), eta))/(-epsilon*t+1)^2+2^(1/2)*GAMMA*x^2*c^3*(diff(diff(f(eta), eta), eta))*(c/(nu*(-epsilon*t+1)))^(1/2)*(diff(diff(diff(f(eta), eta), eta), eta))/(-epsilon*t+1)^3+A*g*beta[T]*theta(eta)*T[w]-A*g*beta[T]*theta(eta)*T[infinity]+A*g*beta[C]*phi(eta)*C[w]-A*g*beta[C]*phi(eta)*C[infinity]-sigma*B^2*x*c*(diff(f(eta), eta))/(rho*(-epsilon*t+1))+sigma*B^2*a*x/(rho*(-epsilon*t+1))

S:=x*c^2*(diff(f(eta), eta, eta, eta))/(-epsilon*t+1)^2:
foo:=isolate(S=K,diff(f(eta), eta, eta, eta)):

temp:=subs(K=S,isolate(eval(expr,foo),K));
MmaTranslator:-Mma:-LeafCount(%), length(%);

x*c^2*(diff(diff(diff(f(eta), eta), eta), eta))/(-epsilon*t+1)^2 = (-x*c*(diff(f(eta), eta))*epsilon/(-epsilon*t+1)^2-(1/2)*x*c^2*(diff(diff(f(eta), eta), eta))*y*epsilon/((-epsilon*t+1)^3*(c/(nu*(-epsilon*t+1)))^(1/2)*nu)-x*c^2*(diff(f(eta), eta))^2/(-epsilon*t+1)^2+(c*nu/(-epsilon*t+1))^(1/2)*f(eta)*x*c*(diff(diff(f(eta), eta), eta))*(c/(nu*(-epsilon*t+1)))^(1/2)/(-epsilon*t+1)+a*x*epsilon/(-epsilon*t+1)^2+a^2*x/(-epsilon*t+1)^2+A*g*beta[T]*theta(eta)*T[w]-A*g*beta[T]*theta(eta)*T[infinity]+A*g*beta[C]*phi(eta)*C[w]-A*g*beta[C]*phi(eta)*C[infinity]-sigma*B^2*x*c*(diff(f(eta), eta))/(rho*(-epsilon*t+1))+sigma*B^2*a*x/(rho*(-epsilon*t+1)))/(-2^(1/2)*GAMMA*x*c*(diff(diff(f(eta), eta), eta))*(c/(nu*(-epsilon*t+1)))^(1/2)/(-epsilon*t+1)-1)

285, 1126

lhs(temp)=collect(rhs(temp),diff,u->simplify(simplify(u),size));
MmaTranslator:-Mma:-LeafCount(%), length(%);

x*c^2*(diff(diff(diff(f(eta), eta), eta), eta))/(-epsilon*t+1)^2 = (c^2*(f(eta)*(epsilon*t-1)*(-c*nu/(epsilon*t-1))^(1/2)+(1/2)*y*epsilon)*x*(diff(diff(f(eta), eta), eta))/((-c/(nu*(epsilon*t-1)))^(1/2)*(epsilon*t-1)^3*nu)-x*c^2*(diff(f(eta), eta))^2/(epsilon*t-1)^2+x*((B^2*sigma*t-rho)*epsilon-sigma*B^2)*c*(diff(f(eta), eta))/((epsilon*t-1)^2*rho)+(A*beta[T]*g*rho*(epsilon*t-1)^2*(T[w]-T[infinity])*theta(eta)+A*beta[C]*g*rho*(epsilon*t-1)^2*(C[w]-C[infinity])*phi(eta)-((-epsilon-a)*rho+sigma*B^2*(epsilon*t-1))*x*a)/((epsilon*t-1)^2*rho))/(-1+2^(1/2)*GAMMA*x*c*(-c/(nu*(epsilon*t-1)))^(1/2)*(diff(diff(f(eta), eta), eta))/(epsilon*t-1))

254, 1012

lhs(temp)=simplify(collect(rhs(temp),diff,u->simplify(simplify(u),size)),size);
MmaTranslator:-Mma:-LeafCount(%), length(%);

x*c^2*(diff(diff(diff(f(eta), eta), eta), eta))/(-epsilon*t+1)^2 = ((epsilon*t-1)*(-rho*(diff(f(eta), eta))^2*c^2*x-c*x*(epsilon*rho-sigma*B^2*(epsilon*t-1))*(diff(f(eta), eta))+A*beta[T]*g*rho*(epsilon*t-1)^2*(T[w]-T[infinity])*theta(eta)+A*beta[C]*g*rho*(epsilon*t-1)^2*(C[w]-C[infinity])*phi(eta)+((epsilon+a)*rho-sigma*B^2*(epsilon*t-1))*a*x)*nu*(-c/(nu*(epsilon*t-1)))^(1/2)+c^2*rho*(diff(diff(f(eta), eta), eta))*(f(eta)*(epsilon*t-1)*(-c*nu/(epsilon*t-1))^(1/2)+(1/2)*y*epsilon)*x)/((-c/(nu*(epsilon*t-1)))^(1/2)*(epsilon*t-1)^2*nu*rho*(2^(1/2)*GAMMA*x*c*(-c/(nu*(epsilon*t-1)))^(1/2)*(diff(diff(f(eta), eta), eta))-epsilon*t+1))

243, 1012

lhs(temp)=simplify(collect(rhs(temp),diff,u->simplify(radnormal(u),size)),size);
MmaTranslator:-Mma:-LeafCount(%), length(%);

x*c^2*(diff(diff(diff(f(eta), eta), eta), eta))/(-epsilon*t+1)^2 = (1/2)*(-2*(f(eta)*(epsilon*t-1)*(-c*nu/(epsilon*t-1))^(1/2)+(1/2)*y*epsilon)*c*rho*(diff(diff(f(eta), eta), eta))*x*(-c/(nu*(epsilon*t-1)))^(1/2)-2*rho*(diff(f(eta), eta))^2*c^2*x-2*c*x*(epsilon*rho-sigma*B^2*(epsilon*t-1))*(diff(f(eta), eta))+2*A*beta[T]*g*rho*(epsilon*t-1)^2*(T[w]-T[infinity])*theta(eta)+2*A*beta[C]*g*rho*(epsilon*t-1)^2*(C[w]-C[infinity])*phi(eta)+2*((epsilon+a)*rho-sigma*B^2*(epsilon*t-1))*a*x)/((epsilon*t-1)*rho*(2^(1/2)*GAMMA*x*c*(-c/(nu*(epsilon*t-1)))^(1/2)*(diff(diff(f(eta), eta), eta))-epsilon*t+1))

220, 929

lhs(temp)=simplify(simplify(rhs(temp)),size);
MmaTranslator:-Mma:-LeafCount(%), length(%);

x*c^2*(diff(diff(diff(f(eta), eta), eta), eta))/(-epsilon*t+1)^2 = ((epsilon*t-1)*(-rho*(diff(f(eta), eta))^2*c^2*x-c*x*(epsilon*rho-sigma*B^2*(epsilon*t-1))*(diff(f(eta), eta))+A*beta[T]*g*rho*(epsilon*t-1)^2*(T[w]-T[infinity])*theta(eta)+A*beta[C]*g*rho*(epsilon*t-1)^2*(C[w]-C[infinity])*phi(eta)+((epsilon+a)*rho-sigma*B^2*(epsilon*t-1))*a*x)*nu*(-c/(nu*(epsilon*t-1)))^(1/2)+c^2*rho*(diff(diff(f(eta), eta), eta))*(f(eta)*(epsilon*t-1)*(-c*nu/(epsilon*t-1))^(1/2)+(1/2)*y*epsilon)*x)/((-c/(nu*(epsilon*t-1)))^(1/2)*(epsilon*t-1)^2*nu*rho*(2^(1/2)*GAMMA*x*c*(-c/(nu*(epsilon*t-1)))^(1/2)*(diff(diff(f(eta), eta), eta))-epsilon*t+1))

243, 1012

lhs(temp)=simplify(radnormal(rhs(temp)),size);
MmaTranslator:-Mma:-LeafCount(%), length(%);

x*c^2*(diff(diff(diff(f(eta), eta), eta), eta))/(-epsilon*t+1)^2 = -(1/2)*((epsilon*t-1)*(-rho*(diff(f(eta), eta))^2*c^2*x-c*x*(epsilon*rho-sigma*B^2*(epsilon*t-1))*(diff(f(eta), eta))+A*beta[T]*g*rho*(epsilon*t-1)^2*(T[w]-T[infinity])*theta(eta)+A*beta[C]*g*rho*(epsilon*t-1)^2*(C[w]-C[infinity])*phi(eta)+((epsilon+a)*rho-sigma*B^2*(epsilon*t-1))*a*x)*nu*(-c/(nu*(epsilon*t-1)))^(1/2)+c^2*rho*(diff(diff(f(eta), eta), eta))*(f(eta)*(epsilon*t-1)*(-c*nu/(epsilon*t-1))^(1/2)+(1/2)*y*epsilon)*x)*2^(1/2)/(rho*(epsilon*t-1)*((1/2)*2^(1/2)*nu*(epsilon*t-1)^2*(-c/(nu*(epsilon*t-1)))^(1/2)+c^2*GAMMA*(diff(diff(f(eta), eta), eta))*x))

236, 993

 

Download something.mw

restart;

kernelopts(version);

     Maple 2017.2, X86 64 LINUX, Jul 19 2017, Build ID 1247392

eq:=-44.51913564*sinh(sqrt(x))*x^5*sin(sqrt(x))*cos(0.6232678986e-1*x)
+5.872275982*x^(11/2)*cosh(sqrt(x))*sin(sqrt(x))*cos(0.6232678986e-1*x)
+5.872295982*x^(11/2)*sinh(sqrt(x))*cos(sqrt(x))*cos(0.6232678986e-1*x)
-0.1e-5*x^6*sinh(sqrt(x))*sin(sqrt(x))*cos(0.6232678986e-1*x)
+11465.08352*x^6*cosh(sqrt(x))*cos(sqrt(x))*cos(0.6232678986e-1*x)
-0.10000e-4*x^(11/2)*sin(sqrt(x))*cos(sqrt(x))*cos(0.6232678986e-1*x)
+.1246535797*cosh(sqrt(x))*x^4*cos(sqrt(x))*cos(0.6232678986e-1*x)
+158.9969129*x^(9/2)*sinh(sqrt(x))*cos(sqrt(x))*cos(0.6232678986e-1*x)
-94.84329962*cosh(sqrt(x))*x^5*cos(sqrt(x))*sin(0.6232678986e-1*x)
-0.2e-2*x^7*sinh(sqrt(x))*sin(sqrt(x))*sin(0.6232678986e-1*x)
+0.4000e-2*x^(13/2)*cosh(sqrt(x))*sin(0.6232678986e-1*x)*sinh(sqrt(x))
+0.10000e-4*x^(11/2)*cosh(sqrt(x))*sinh(sqrt(x))*cos(0.6232678986e-1*x)
-158.9969129*cosh(sqrt(x))*x^(9/2)*sin(sqrt(x))*cos(0.6232678986e-1*x)
+38209.64552*sinh(sqrt(x))*x^6*sin(sqrt(x))*sin(0.6232678986e-1*x)
-3761.932636*x^(13/2)*cosh(sqrt(x))*sin(sqrt(x))*sin(0.6232678986e-1*x)
-3761.924636*x^(13/2)*sinh(sqrt(x))*cos(sqrt(x))*sin(0.6232678986e-1*x)
-0.4000e-2*x^(13/2)*sin(sqrt(x))*cos(sqrt(x))*sin(0.6232678986e-1*x)
-2.*10^(-7)*x^(13/2)*cosh(sqrt(x))*sin(sqrt(x))*cos(0.6232678986e-1*x)
-11465.08352*x^6*cos(0.6232678986e-1*x)+.1246535797*x^4*cos(0.6232678986e-1*x)
-94.84329962*x^5*sin(0.6232678986e-1*x)+0.1e-5*x^6*cosh(sqrt(x))^2*cos(0.6232678986e-1*x)
-0.1e-5*x^6*cos(sqrt(x))^2*cos(0.6232678986e-1*x)+0.3e-5*cosh(sqrt(x))^2*x^6*sin(0.6232678986e-1*x)
-0.2e-2*x^7*cos(sqrt(x))^2*sin(0.6232678986e-1*x)+0.2e-2*x^7*cosh(sqrt(x))^2*sin(0.6232678986e-1*x)
+2.*10^(-7)*x^(13/2)*sinh(sqrt(x))*cosh(sqrt(x))*cos(0.6232678986e-1*x)
+2.*10^(-7)*x^(13/2)*cos(sqrt(x))*sin(sqrt(x))*cos(0.6232678986e-1*x)
-2.*10^(-7)*x^(13/2)*sinh(sqrt(x))*cos(sqrt(x))*cos(0.6232678986e-1*x)
+1.159305284*10^5*cosh(sqrt(x))*x^(11/2)*sin(sqrt(x))*sin(0.6232678986e-1*x)
-1.159305284*10^5*x^(11/2)*sinh(sqrt(x))*cos(sqrt(x))*sin(0.6232678986e-1*x)
-8.359616334*10^6*x^7*cosh(sqrt(x))*cos(sqrt(x))*sin(0.6232678986e-1*x)
+8.359616334*10^6*x^7*sin(0.6232678986e-1*x) = 0:

#plot(lhs(eq),x=0..0.2,-1e-7..1e-7);

Digits:=10:
rt[1]:=0.0:
for i from 1 to 5 do
  rt[i+1]:=RootFinding:-NextZero(unapply(lhs(eq),x), rt[i]);
end do:
convert(rt,list);

     [0., 0.04191897329, 0.1445773188, 22.37101613, 50.40561001, 61.67210358]

Digits:=10:
op(sort(simplify({RootFinding:-Analytic(eq,x=0-0.1*I..100+0.1*I)},zero)));

     0., 0.04191897312, 0.1445773137, 22.37101614, 50.40561000, 61.67210360

Digits:=20:
op(sort(simplify({RootFinding:-Analytic(eq,x=0-0.1*I..100+0.1*I)},zero)));

     0., 0.041918973291358269200, 0.14457731887993756592, 
     22.371016133870070862, 50.405610019621053775, 61.672103588567668205

posroots.mw

You could use the explicit location of the .mpl file in the script file, eg,

/Library/Frameworks/Maple.framework/Versions/2017/bin/maple /Users/myname/Desktop/maple_test/test.mpl > output.txt

Note that output.txt may still appear in the directory from which you call test.command , but that may be what you want.

Select the whole visible inlined Input/Output with the mouse cursor. Then from the main menubar choose Edit->Document Blocks->Toggle Input/Output Display.

That lets you switch between showing just the Input or the Output, for the selected inlined item. So you can switch back to the Input display, for further editing.

You may have to still delete the extra `=` sign between the inlined Input and Output.

 

There's probably something easier.

As you say, N and the numbers R[p], for p=1..N will be supplied.

restart;

N:=7;

for p from 1 to N do
  R[p]:=rand(2..4)();
end do;
                             N := 7
                           R[1] := 2
                           R[2] := 4
                           R[3] := 4
                           R[4] := 3
                           R[5] := 2
                           R[6] := 3
                           R[7] := 3

i:='i': j:='j':
S:=op(eval(subs(_seq=seq,[foldl(_seq,F(seq('i'[j],j=1..N)),seq(i[p]=1..R[p],p=1..N))]))):

nops({S}) = mul(R[p],p=1..N);
                           1728 = 1728

I doubt any of these would work in Maple 8 or earlier.  But I might be remembering wrongly.

restart;

d_string:="D*e*v*o*u*r*e*r":

Typesetting:-mrow(Typesetting:-mn(cat(`Does `,d_string,` = `)),Typesetting:-mo("&eta;"));

"Does D*e*v*o*u*r*e*r = eta"

cat(`#mrow(mn(`,`"Does `,d_string,` = "`,`),mo("&eta;"));`);

`#mrow(mn("Does D*e*v*o*u*r*e*r = "),mo("&eta;"));`

nprintf( "#mrow(mn(\"Does %s = \"),mo(\"&%a;\"));", d_string, eta );

`#mrow(mn("Does D*e*v*o*u*r*e*r = "),mo("&eta;"));`

 

Download typ.mw

I expect that you could do it using textplot and the SYMBOL font, on a 2D plot, though.

This is interpolating in just one direction. You could change the method from cubic to linear, if you want. Let me know if this isn't adequate.

restart;

M:=ExcelTools:-Import(cat(kernelopts(homedir),"/mapleprimes/O233.xlsx")):

op(1,M);

290, 59

plots:-listplot(M[150,..],view=1500..1600,size=[400,200]);

L:=[seq(i,i=1..59)]:

A,B:=selectremove(p->M[100,p]<10,L):
A;

[32, 33]

R:=CurveFitting:-ArrayInterpolation(B,M[100,B],A,method=cubic);

[HFloat(1584.1946296296264), HFloat(1573.5070370370522)]

V:=Vector(59):
V[B]:=M[150,B]:
V[A]:=<R>:

plots:-listplot(V,view=1500..1600,size=[400,200]);

restart;

M := ExcelTools:-Import(cat(kernelopts(homedir),"/mapleprimes/O233.xlsx")):
m,n := op(1,M);

290, 59

final := copy(M):

L := [seq(i,i=1..n)]:
for j from 1 to m do
  A,B := selectremove(p->M[j,p]<10, L):
  R := CurveFitting:-ArrayInterpolation(B,M[j,B],A,method=cubic);
  final[j,A] := <R>:
end do:

plots:-surfdata(M,view=1520..1600,orientation=[-10,80,0]);

plots:-surfdata(final,orientation=[-10,80,0]);

You can also compare, using the above,
plots:-surfdata(M,view=[default,0.45..0.6,1520..1600],orientation=[30,60,0]);
plots:-surfdata(final,view=[default,0.45..0.6,1520..1600],orientation=[30,60,0]);

interp_ex.mw

I had this problem ( error message about GL3bc -> GL4bc mapping) with Maple 2017.3 on a Linux Ubuntu 17.10 machine with an Nvidia video card.

I believe that indicated an OpenGL problem (in my case used by Maple 2017's Java GUI).

It was fixed by switching from the default X.org video drivers to the Nvidia proprietary driver.

First 179 180 181 182 183 184 185 Last Page 181 of 336