Kitonum

21435 Reputation

26 Badges

17 years, 28 days

MaplePrimes Activity


These are replies submitted by Kitonum

@vv  I think the reason is that Maple is plotting  the surface by the values of the function on a rectangular grid. The domain of the function may be different from this rectangular region and many points do not lie on the border. Here is a simple example, where it is clearly visible:

S:=y^(1/3);

plot3d(S, x=0..1, y=0..1, grid=[30,30], axes=normal, view=[0..1,0..1,0..1], orientation=[-25,70]);  # OK

 

Slightly change the range for  y  variable:

plot3d(S, x=0..1,y=-0.1..1 , grid=[30,30], axes=normal, view=[0..1,0..1,0..1], orientation=[-25,70]);  # Not very good plotting because the grid's points do not lie on the  x-axis

                             

 

 

 

   Change the grid in order to its points again lie on the  x-axis:

plot3d(S,  x=0..1, y=-0.1..1, grid=[23,23], axes=normal, view=[0..1,0..1,0..1], orientation=[-25,70]);  # Now OK again

                              

                       

 

 

@Bendesarts  I do not understand. You wrote "I have tried but it seems that no simplifications is made with this function simplify(,size)".   Compare the lengths of expressions  condition1  and  condition2 . The latter is about 5 times shorter:

 

restart;

A1 := (-2*cr*mr*cos(gamma[3](t)-phi[3](t))+2*cr*mr*cos(-phi[4](t)+gamma[4](t))-2*cr*(cos(gamma[3](t))*pr-cos(gamma[4](t))*pr+zp[3](t)-zp[4](t)))/cr^2;

(-2*cr*mr*cos(gamma[3](t)-phi[3](t))+2*cr*mr*cos(-phi[4](t)+gamma[4](t))-2*cr*(cos(gamma[3](t))*pr-cos(gamma[4](t))*pr+zp[3](t)-zp[4](t)))/cr^2

(1)

B1 := (-2*cr*mr*sin(gamma[3](t)-phi[3](t))+2*cr*mr*sin(-phi[4](t)+gamma[4](t))-2*cr*(pr*sin(gamma[3](t))-pr*sin(gamma[4](t))+xp[3](t)-xp[4](t)))/cr^2;

(-2*cr*mr*sin(gamma[3](t)-phi[3](t))+2*cr*mr*sin(-phi[4](t)+gamma[4](t))-2*cr*(pr*sin(gamma[3](t))-pr*sin(gamma[4](t))+xp[3](t)-xp[4](t)))/cr^2

(2)

CC1:=(1/cr^2)*(-2*mr*(cos(gamma[4](t))*pr+cos(-phi[4](t)+gamma[4](t))*mr-cos(gamma[3](t))*pr+zp[4](t)-zp[3](t))*cos(gamma[3](t)-phi[3](t))+2*mr*(cos(gamma[4](t))*pr-cos(gamma[3](t))*pr+zp[4](t)-zp[3](t))*cos(-phi[4](t)+gamma[4](t))-2*mr*(pr*sin(gamma[4](t))-pr*sin(gamma[3](t))+mr*sin(-phi[4](t)+gamma[4](t))-xp[3](t)+xp[4](t))*sin(gamma[3](t)-phi[3](t))+2*mr*(pr*sin(gamma[4](t))-pr*sin(gamma[3](t))-xp[3](t)+xp[4](t))*sin(-phi[4](t)+gamma[4](t))-2*pr*(cos(gamma[4](t))*pr-zp[3](t)+zp[4](t))*cos(gamma[3](t))-2*pr*(zp[3](t)-zp[4](t))*cos(gamma[4](t))-2*pr*(pr*sin(gamma[4](t))-xp[3](t)+xp[4](t))*sin(gamma[3](t))-2*pr*(xp[3](t)-xp[4](t))*sin(gamma[4](t))+2*mr^2+2*pr^2+xp[3](t)^2-2*xp[3](t)*xp[4](t)+xp[4](t)^2+zp[3](t)^2-2*zp[4](t)*zp[3](t)+zp[4](t)^2);

(-2*mr*(cos(gamma[4](t))*pr+cos(-phi[4](t)+gamma[4](t))*mr-cos(gamma[3](t))*pr+zp[4](t)-zp[3](t))*cos(gamma[3](t)-phi[3](t))+2*mr*(cos(gamma[4](t))*pr-cos(gamma[3](t))*pr+zp[4](t)-zp[3](t))*cos(-phi[4](t)+gamma[4](t))-2*mr*(pr*sin(gamma[4](t))-pr*sin(gamma[3](t))+mr*sin(-phi[4](t)+gamma[4](t))-xp[3](t)+xp[4](t))*sin(gamma[3](t)-phi[3](t))+2*mr*(pr*sin(gamma[4](t))-pr*sin(gamma[3](t))-xp[3](t)+xp[4](t))*sin(-phi[4](t)+gamma[4](t))-2*pr*(cos(gamma[4](t))*pr-zp[3](t)+zp[4](t))*cos(gamma[3](t))-2*pr*(zp[3](t)-zp[4](t))*cos(gamma[4](t))-2*pr*(pr*sin(gamma[4](t))-xp[3](t)+xp[4](t))*sin(gamma[3](t))-2*pr*(xp[3](t)-xp[4](t))*sin(gamma[4](t))+2*mr^2+2*pr^2+xp[3](t)^2-2*xp[3](t)*xp[4](t)+xp[4](t)^2+zp[3](t)^2-2*zp[4](t)*zp[3](t)+zp[4](t)^2)/cr^2

(3)

condition1:=simplify(A1^2+B1^2-CC1^2,trig);

(4*zp[3](t)^3*zp[4](t)+4*xp[3](t)^3*xp[4](t)+(8*cr^2-24*pr^2)*mr^2+(4*cr^2-4*mr^2-4*pr^2)*zp[4](t)^2+(4*cr^2-4*mr^2-4*pr^2-6*zp[4](t)^2)*zp[3](t)^2+(4*cr^2-12*mr^2-12*pr^2-2*zp[3](t)^2+4*zp[4](t)*zp[3](t)-2*zp[4](t)^2)*xp[4](t)^2+(4*cr^2-12*mr^2-12*pr^2-6*xp[4](t)^2-2*zp[3](t)^2+4*zp[4](t)*zp[3](t)-2*zp[4](t)^2)*xp[3](t)^2-8*mr^2*(-mr*(pr*sin(gamma[3](t))-pr*sin(gamma[4](t))+xp[3](t)-xp[4](t))*sin(gamma[3](t)-phi[3](t))+cos(gamma[3](t))^2*pr^2-pr*(cos(gamma[4](t))*pr-zp[3](t)+zp[4](t))*cos(gamma[3](t))+cos(gamma[4](t))^2*pr^2-pr*(zp[3](t)-zp[4](t))*cos(gamma[4](t))+pr*(pr*sin(gamma[4](t))-xp[3](t)+xp[4](t))*sin(gamma[3](t))+pr*(xp[3](t)-xp[4](t))*sin(gamma[4](t))-zp[4](t)*zp[3](t)+xp[3](t)*xp[4](t)+(1/2)*zp[3](t)^2+(1/2)*zp[4](t)^2-(1/2)*xp[3](t)^2-(1/2)*xp[4](t)^2-(1/2)*mr^2-pr^2)*cos(-phi[4](t)+gamma[4](t))^2-8*mr^2*(cos(-phi[4](t)+gamma[4](t))^2*mr^2-mr*(cos(gamma[3](t))*pr-cos(gamma[4](t))*pr+zp[3](t)-zp[4](t))*cos(-phi[4](t)+gamma[4](t))+mr*(pr*sin(gamma[3](t))-pr*sin(gamma[4](t))+xp[3](t)-xp[4](t))*sin(-phi[4](t)+gamma[4](t))+cos(gamma[3](t))^2*pr^2-pr*(cos(gamma[4](t))*pr-zp[3](t)+zp[4](t))*cos(gamma[3](t))+cos(gamma[4](t))^2*pr^2-pr*(zp[3](t)-zp[4](t))*cos(gamma[4](t))+pr*(pr*sin(gamma[4](t))-xp[3](t)+xp[4](t))*sin(gamma[3](t))+pr*(xp[3](t)-xp[4](t))*sin(gamma[4](t))-zp[4](t)*zp[3](t)+xp[3](t)*xp[4](t)+(1/2)*zp[3](t)^2+(1/2)*zp[4](t)^2-(1/2)*xp[3](t)^2-(1/2)*xp[4](t)^2-(1/2)*mr^2-pr^2)*cos(gamma[3](t)-phi[3](t))^2-8*(-(1/2)*zp[4](t)^2-mr^2-pr^2+cr^2)*zp[4](t)*zp[3](t)-8*xp[4](t)*(cr^2-3*mr^2-3*pr^2-(1/2)*xp[4](t)^2-(1/2)*zp[3](t)^2+zp[4](t)*zp[3](t)-(1/2)*zp[4](t)^2)*xp[3](t)-8*pr*(pr*(-pr^2+3*xp[3](t)*xp[4](t)+zp[4](t)*zp[3](t)-3*mr^2-(3/2)*xp[3](t)^2-(3/2)*xp[4](t)^2-(1/2)*zp[3](t)^2-(1/2)*zp[4](t)^2+cr^2)*sin(gamma[4](t))-(cr^2-3*mr^2-2*pr^2-(1/2)*xp[3](t)^2+xp[3](t)*xp[4](t)-(1/2)*xp[4](t)^2-(1/2)*zp[3](t)^2+zp[4](t)*zp[3](t)-(1/2)*zp[4](t)^2)*(xp[3](t)-xp[4](t)))*sin(gamma[3](t))+8*pr^2*(pr*(xp[3](t)-xp[4](t))*sin(gamma[3](t))+mr^2+(1/2)*pr^2+(1/2)*xp[3](t)^2-xp[3](t)*xp[4](t)+(1/2)*xp[4](t)^2-(1/2)*zp[3](t)^2+zp[4](t)*zp[3](t)-(1/2)*zp[4](t)^2)*cos(gamma[4](t))^2-8*(cos(gamma[4](t))^2*pr^2-pr*(zp[3](t)-zp[4](t))*cos(gamma[4](t))+pr*(xp[3](t)-xp[4](t))*sin(gamma[4](t))-mr^2-(1/2)*pr^2-(1/2)*xp[3](t)^2+xp[3](t)*xp[4](t)-(1/2)*xp[4](t)^2+(1/2)*zp[3](t)^2-zp[4](t)*zp[3](t)+(1/2)*zp[4](t)^2)*pr^2*cos(gamma[3](t))^2+8*mr*(pr^2*(pr*sin(gamma[4](t))-xp[3](t)+xp[4](t))*cos(gamma[3](t))^2-pr*(pr*sin(gamma[3](t))-pr*sin(gamma[4](t))+xp[3](t)-xp[4](t))*(cos(gamma[4](t))*pr-zp[3](t)+zp[4](t))*cos(gamma[3](t))-pr^2*(pr*sin(gamma[3](t))+xp[3](t)-xp[4](t))*cos(gamma[4](t))^2-pr*(zp[3](t)-zp[4](t))*(pr*sin(gamma[3](t))-pr*sin(gamma[4](t))+xp[3](t)-xp[4](t))*cos(gamma[4](t))-3*(pr*(xp[3](t)-xp[4](t))*sin(gamma[4](t))+(1/3)*cr^2-(2/3)*mr^2-(2/3)*pr^2-(1/2)*xp[3](t)^2+xp[3](t)*xp[4](t)-(1/2)*xp[4](t)^2-(1/6)*zp[3](t)^2+(1/3)*zp[4](t)*zp[3](t)-(1/6)*zp[4](t)^2)*pr*sin(gamma[3](t))+pr*(cr^2-2*mr^2-2*pr^2-(3/2)*xp[3](t)^2+3*xp[3](t)*xp[4](t)-(3/2)*xp[4](t)^2-(1/2)*zp[3](t)^2+zp[4](t)*zp[3](t)-(1/2)*zp[4](t)^2)*sin(gamma[4](t))-(cr^2-2*mr^2-3*pr^2-(1/2)*xp[3](t)^2+xp[3](t)*xp[4](t)-(1/2)*xp[4](t)^2-(1/2)*zp[3](t)^2+zp[4](t)*zp[3](t)-(1/2)*zp[4](t)^2)*(xp[3](t)-xp[4](t)))*sin(-phi[4](t)+gamma[4](t))-8*((cos(gamma[3](t))^2*pr^2+pr*(cos(gamma[4](t))*pr-zp[3](t)+zp[4](t))*cos(gamma[3](t))+cos(gamma[4](t))^2*pr^2+pr*(zp[3](t)-zp[4](t))*cos(gamma[4](t))+3*pr*(pr*sin(gamma[4](t))-xp[3](t)+xp[4](t))*sin(gamma[3](t))+3*pr*(xp[3](t)-xp[4](t))*sin(gamma[4](t))-mr^2+3*xp[3](t)*xp[4](t)+zp[4](t)*zp[3](t)-3*pr^2-(3/2)*xp[3](t)^2-(3/2)*xp[4](t)^2-(1/2)*zp[3](t)^2-(1/2)*zp[4](t)^2+cr^2)*mr*sin(-phi[4](t)+gamma[4](t))+pr^2*(pr*sin(gamma[4](t))-xp[3](t)+xp[4](t))*cos(gamma[3](t))^2-pr*(pr*sin(gamma[3](t))-pr*sin(gamma[4](t))+xp[3](t)-xp[4](t))*(cos(gamma[4](t))*pr-zp[3](t)+zp[4](t))*cos(gamma[3](t))-pr^2*(pr*sin(gamma[3](t))+xp[3](t)-xp[4](t))*cos(gamma[4](t))^2-pr*(zp[3](t)-zp[4](t))*(pr*sin(gamma[3](t))-pr*sin(gamma[4](t))+xp[3](t)-xp[4](t))*cos(gamma[4](t))-3*(pr*(xp[3](t)-xp[4](t))*sin(gamma[4](t))+(1/3)*cr^2-(2/3)*mr^2-(2/3)*pr^2-(1/2)*xp[3](t)^2+xp[3](t)*xp[4](t)-(1/2)*xp[4](t)^2-(1/6)*zp[3](t)^2+(1/3)*zp[4](t)*zp[3](t)-(1/6)*zp[4](t)^2)*pr*sin(gamma[3](t))+pr*(cr^2-2*mr^2-2*pr^2-(3/2)*xp[3](t)^2+3*xp[3](t)*xp[4](t)-(3/2)*xp[4](t)^2-(1/2)*zp[3](t)^2+zp[4](t)*zp[3](t)-(1/2)*zp[4](t)^2)*sin(gamma[4](t))-(cr^2-2*mr^2-3*pr^2-(1/2)*xp[3](t)^2+xp[3](t)*xp[4](t)-(1/2)*xp[4](t)^2-(1/2)*zp[3](t)^2+zp[4](t)*zp[3](t)-(1/2)*zp[4](t)^2)*(xp[3](t)-xp[4](t)))*mr*sin(gamma[3](t)-phi[3](t))+8*cr^2*pr^2-8*(cos(gamma[3](t))*pr-cos(gamma[4](t))*pr+zp[3](t)-zp[4](t))*(-mr*(pr*sin(gamma[3](t))-pr*sin(gamma[4](t))-mr*sin(-phi[4](t)+gamma[4](t))+xp[3](t)-xp[4](t))*sin(gamma[3](t)-phi[3](t))+mr*(pr*sin(gamma[3](t))-pr*sin(gamma[4](t))+xp[3](t)-xp[4](t))*sin(-phi[4](t)+gamma[4](t))+pr*(cos(gamma[4](t))*pr-zp[3](t)+zp[4](t))*cos(gamma[3](t))+pr*(zp[3](t)-zp[4](t))*cos(gamma[4](t))+pr*(pr*sin(gamma[4](t))-xp[3](t)+xp[4](t))*sin(gamma[3](t))+pr*(xp[3](t)-xp[4](t))*sin(gamma[4](t))+zp[4](t)*zp[3](t)+xp[3](t)*xp[4](t)-(1/2)*zp[3](t)^2-(1/2)*zp[4](t)^2-(1/2)*xp[3](t)^2-(1/2)*xp[4](t)^2-mr^2-pr^2+cr^2)*mr*cos(-phi[4](t)+gamma[4](t))-8*(cr^2-3*mr^2-2*pr^2-(1/2)*xp[3](t)^2+xp[3](t)*xp[4](t)-(1/2)*xp[4](t)^2-(1/2)*zp[3](t)^2+zp[4](t)*zp[3](t)-(1/2)*zp[4](t)^2)*pr*(xp[3](t)-xp[4](t))*sin(gamma[4](t))-8*(pr*(pr*sin(gamma[4](t))-xp[3](t)+xp[4](t))*sin(gamma[3](t))+pr*(xp[3](t)-xp[4](t))*sin(gamma[4](t))+zp[4](t)*zp[3](t)+xp[3](t)*xp[4](t)-(1/2)*zp[3](t)^2-(1/2)*zp[4](t)^2-(1/2)*xp[3](t)^2-(1/2)*xp[4](t)^2-mr^2-pr^2+cr^2)*pr*(zp[3](t)-zp[4](t))*cos(gamma[4](t))+8*mr*(mr*(cos(gamma[3](t))*pr-cos(gamma[4](t))*pr+zp[3](t)-zp[4](t))*cos(-phi[4](t)+gamma[4](t))-mr*(pr*sin(gamma[3](t))-pr*sin(gamma[4](t))-mr*sin(-phi[4](t)+gamma[4](t))+xp[3](t)-xp[4](t))*sin(gamma[3](t)-phi[3](t))+mr*(pr*sin(gamma[3](t))-pr*sin(gamma[4](t))+xp[3](t)-xp[4](t))*sin(-phi[4](t)+gamma[4](t))+pr*(cos(gamma[4](t))*pr-zp[3](t)+zp[4](t))*cos(gamma[3](t))+pr*(zp[3](t)-zp[4](t))*cos(gamma[4](t))+pr*(pr*sin(gamma[4](t))-xp[3](t)+xp[4](t))*sin(gamma[3](t))+pr*(xp[3](t)-xp[4](t))*sin(gamma[4](t))+zp[4](t)*zp[3](t)+xp[3](t)*xp[4](t)-(1/2)*zp[3](t)^2-(1/2)*zp[4](t)^2-(1/2)*xp[3](t)^2-(1/2)*xp[4](t)^2-mr^2-pr^2+cr^2)*(cos(gamma[3](t))*pr-cos(gamma[4](t))*pr-cos(-phi[4](t)+gamma[4](t))*mr+zp[3](t)-zp[4](t))*cos(gamma[3](t)-phi[3](t))-8*(cos(gamma[4](t))*pr-zp[3](t)+zp[4](t))*pr*(pr*(zp[3](t)-zp[4](t))*cos(gamma[4](t))+pr*(pr*sin(gamma[4](t))-xp[3](t)+xp[4](t))*sin(gamma[3](t))+pr*(xp[3](t)-xp[4](t))*sin(gamma[4](t))+zp[4](t)*zp[3](t)+xp[3](t)*xp[4](t)-(1/2)*zp[3](t)^2-(1/2)*zp[4](t)^2-(1/2)*xp[3](t)^2-(1/2)*xp[4](t)^2-mr^2-pr^2+cr^2)*cos(gamma[3](t))-8*mr^4-8*pr^4-zp[3](t)^4-zp[4](t)^4-xp[3](t)^4-xp[4](t)^4)/cr^4

(4)

condition2 := simplify(A1^2+B1^2-CC1^2, size);

4*(mr*cos(gamma[3](t)-phi[3](t))-cos(-phi[4](t)+gamma[4](t))*mr+cos(gamma[3](t))*pr-cos(gamma[4](t))*pr+zp[3](t)-zp[4](t))^2/cr^2+4*(mr*sin(gamma[3](t)-phi[3](t))-mr*sin(-phi[4](t)+gamma[4](t))+pr*sin(gamma[3](t))-pr*sin(gamma[4](t))+xp[3](t)-xp[4](t))^2/cr^2-(-2*mr*(cos(gamma[4](t))*pr+cos(-phi[4](t)+gamma[4](t))*mr-cos(gamma[3](t))*pr+zp[4](t)-zp[3](t))*cos(gamma[3](t)-phi[3](t))+2*mr*(cos(gamma[4](t))*pr-cos(gamma[3](t))*pr+zp[4](t)-zp[3](t))*cos(-phi[4](t)+gamma[4](t))-2*mr*(pr*sin(gamma[4](t))-pr*sin(gamma[3](t))+mr*sin(-phi[4](t)+gamma[4](t))-xp[3](t)+xp[4](t))*sin(gamma[3](t)-phi[3](t))+2*mr*(pr*sin(gamma[4](t))-pr*sin(gamma[3](t))-xp[3](t)+xp[4](t))*sin(-phi[4](t)+gamma[4](t))-2*pr*(cos(gamma[4](t))*pr-zp[3](t)+zp[4](t))*cos(gamma[3](t))-2*pr*(zp[3](t)-zp[4](t))*cos(gamma[4](t))-2*pr*(pr*sin(gamma[4](t))-xp[3](t)+xp[4](t))*sin(gamma[3](t))-2*pr*(xp[3](t)-xp[4](t))*sin(gamma[4](t))+2*mr^2+2*pr^2+xp[3](t)^2-2*xp[3](t)*xp[4](t)+xp[4](t)^2+zp[3](t)^2-2*zp[4](t)*zp[3](t)+zp[4](t)^2)^2/cr^4

(5)

 

 

Download simplification_condition_de_compatibilité_new.mw

@diedrotn  I do not know any other way to solve your equation.

You have to give a detailed description of the problem as a whole. Maybe then someone will be able to help you.

@taro   I don't know. I never used the syntax  `convert/string`(...)  , only  convert(..., string)

@vv  Thank you.

You wrote "But what would be the simplest workaround for g(x) ?" I don't know. I think that the use of a special symbol like  _x   - is a good idea.

@vv  No, I haven't any references.

@vv  Thank you for your interest. I think that your conjectured theorem is true. Moreover, it can be reinforced by any number of rotating circles  n>=3 . Here is an example of animation with 4 circles. Here should be  x<=3-2*sqrt(2)

Circles1:=proc(x)

local OO, O1, O2, O3, O2x, O2y, OT, dist, Sys, Sol, sol, y, u, z, P;

uses plottools, plots;

OO:=[0,0]: O1:=[x+y,0]: O2:=[O2x,O2y]: O3:=[-x-z,0]: OT:=[x+2*y-1,0]:

dist:=(A,B)->sqrt((B[1]-A[1])^2+(B[2]-A[2])^2):

Sys:={dist(O1,O2)^2=(y+u)^2, dist(OO,O2)^2=(x+u)^2, dist(O2,O3)^2=(u+z)^2,   x+y+z=1, dist(O2,OT)^2=(1-u)^2};

Sol:=op~([allvalues([solve(Sys)])]);

sol:=select(i->is(eval(convert([y>0,u>0,z>0,O2y>0,x<=y,u<=y,z<=u],`and`),i)), Sol)[];

assign(sol);

O1:=[x+y,0]: O2:=[O2x,O2y]: O3:=[-x-z,0]: OT:=[x+2*y-1,0]:

P:=proc(phi)

local eq, r1, r, R, Ot, i, S, s, t, P1, P2;

uses plots,plottools;

eq:=1-dist([r*cos(s),r*sin(s)],OT)=r-x;

r1:=solve(eq,r);

r:=eval(r1,s=phi);

R[1]:=evalf(r-x);

Ot[1]:=evalf([r*cos(phi),r*sin(phi)]);

for i from 2 to 4 do

S:=[solve({1-dist(OT,[s,t])=dist(Ot[i-1],[s,t])-R[i-1], 1-dist(OT,[s,t])=dist(OO,[s,t])-x})];

P1:=eval([s,t],S[1]); P2:=eval([s,t],S[2]);

Ot[i]:=`if`(evalf(Ot[i-1][1]*P1[2]-Ot[i-1][2]*P1[1])>0,P1,P2);

R[i]:=dist(Ot[i],OO)-x;

od;

display(circle([x+2*y-1,0],1, color=blue,thickness=4), circle(OO,x, color=red,thickness=4), seq(circle(Ot[k],R[k], thickness=3),k=1..4), scaling=constrained, axes=none);

end proc:

animate(P,[phi], phi=0..Pi, frames=60);

end proc:

 

Circles1(0.15);

                                  

 

 

 

@C1Ron  If you study the properties of the ellipse and its equation  first time,  then I think that for you would be much more useful to solve this simple example by hand, not with Maple. Of course, if you know how to solve these examples manually, with the help of Maple you can check your solution.

 

@John Fredsted  I do not understand the exact meaning of your statement " But if they are variables themselves, then the -> construction cannot work".  unapply  and  -> construction are the different commands. As OP problem they are equivalent. But in some cases we have to use  unapply command, while in other cases the   -> construction.

Here are two examples.

 

Example 1. We want for each value of the parameter a  to solve the inequality  sqrt(x-a) < x :

F:=unapply(solve(sqrt(x-a)<x, x), a);

G:=a->solve(sqrt(x-a)<x, x);

F(-1);

G(-1);

 

Example 2. We want for each natural  n  to solve the recurrent equation  u(n+1)=3+2*u(n), u(1)=1 :

f:=n->rsolve({u(n+1)=3+2*u(n), u(1)=1}, u(n));

g:=unapply(rsolve({u(n+1)=3+2*u(n), u(1)=1}, u(n)), n);

f(2);

g(2);

 

We see that in the first example  unapply  command fails, and in the second example  -> construction fails.

@John Fredsted  I think that OP wants to define the argument as a list. If no then the simpliest variant is an arrow-function:

test := (x,y,z)->[y,y*z-x,-15*x*y-x*z-x]:

test(a,b,c);

test(1,1,1);

@Preben Alsholm  Very witty and surprising method! Vote up.

@Carl Love  Your methods sometimes provide a more complete factorization (perhaps undesirable in some cases). Suppose we want to collect only  relatively  a^4*b :

S:=a^4*b*c*x^2+a^4*b*c*y+a^4*b*c+z;

subs(t=a^4*b, collect(algsubs(a^4*b=t, S), t));

subs(t=a^4*b, collect(simplify(S, {a^4*b=t}), t));

thaw(collect(simplify(S, {a^4*b= freeze(a^4*b)}), t));

                      

 

 

 

@emendes 

interface(rtablesize=infinity):

aux:=[-x1*x2+u0,x1*x1-2*x2,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10];

f:=Vector[row](aux);

@taro  Christian's code gives a more complete factorization. But the same can be made more simple and understandable code:

e:= g^((2*(-sigma+k+1))/(-1+sigma))-tau^2:

combine(factor(expand(e)));

 

or

normal(combine(factor(expand(e))));

without the factor  -1  ahead.

@Carl Love   Thanks. Take a look at my second method.

First 74 75 76 77 78 79 80 Last Page 76 of 132