Kitonum

21690 Reputation

26 Badges

17 years, 186 days

MaplePrimes Activity


These are replies submitted by Kitonum

@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.

@Carl Love  I think the gold circle is the set of points of tangency of black circles.

@shani2775  Use the code below

restart;

u[0] := (4/3)*c^2*cos((1/4)*x)^2; alpha := 2;

iteration := 3;

for k from 0 while k <= iteration do

u[s] := eval(u[k], t = xi); u[k+1] := simplify(u[k]-(int(diff(u[s], [`$`(xi, alpha)])+diff(u[s]*u[s], x)+diff(u[s]*u[s], x, x, x), xi = 0 .. t)))

end do;

@Carl Love   From the original within Maple we can see

f := unapply((1), x, y)

First 75 76 77 78 79 80 81 Last Page 77 of 133