Maple 2018 Questions and Posts

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

My Maple worksheet, which was working fine a few days ago, suddently cannot be modified. Many elements on the top bar (execute group, execute entire worksheet, insert maple prompt) are grayed out. Additionally I cannot edit any commands in the worksheet; clicking a command does not show any cursor and keyboard input does nothing.

Apparently I have entered some kind of read-only mode. I do not know how I did this. Meanwhile, if I start a new worksheet I can edit and execute as normal.

How do I revert my worksheet back to normal?

Hello. Please help me solve the ODE system

ODU_v2.mw
 

restart

with(linalg):

r1 := 1:

1

 

0.1111110000e-2

 

0

 

1920.000000+0.7407400000e-3*I

(1)

J := proc (n, x) options operator, arrow; BesselJ(n, x) end proc:

nsize := floor(2*k)+1;

3

(2)

n := 1; A1 := matrix([[(lambda(r)+2*mu(r))*r^2, 0], [0, mu(r)*r^2]]); B1 := matrix([[(diff(lambda(r), r)+2*(diff(mu(r), r)))*r^2+(lambda(r)+2*mu(r))*r, I*n*(lambda(r)+mu(r))*r], [I*n*(lambda(r)+mu(r))*r, (diff(mu(r), r))*r^2+mu(r)*r]]); C1 := matrix([[(diff(lambda(r), r))*r-lambda(r)-(n^2+2)*mu(r)+omega^2*rho(r)*r^2, I*n*((diff(lambda(r), r))*r-lambda(r)-3*mu(r))], [I*n*((diff(mu(r), r))*r+lambda(r)+3*mu(r)), -(diff(mu(r), r))*r-n^2*lambda(r)-(2*n^2+1)*mu(r)+omega^2*rho(r)*r^2]]); U := vector([U1(r), U2(r)]); DU := vector([diff(U1(r), r), diff(U2(r), r)]); D2U := vector([diff(U1(r), `$`(r, 2)), diff(U2(r), `$`(r, 2))]); T1 := multiply(A1, D2U); T2 := multiply(B1, DU); T3 := multiply(C1, U); prav := evalm(T1+T2+T3); pr1 := prav[1]; pr2 := prav[2]; p1 := evalc(Re(pr1)); p2 := evalc(Im(pr1)); p3 := evalc(Re(pr2)); p4 := evalc(Im(pr2)); WWVV := evalf(subs(x = k*r1, H(n, x)))*evalf(subs(x = k2*r1, H(n, x)))*n^2-evalf(subs(x = k*r1, DH(n, x)))*evalf(subs(x = k2*r1, DH(n, x)))*k*k2*r1^2; `αv1` := I*evalf(subs(x = k2*r1, DH(n, x)))*k2*omega*r1^2/WWVV; `αv2` := -evalf(subs(x = k2*r1, H(n, x)))*n*omega*r1/WWVV; `αv3` := (evalf(subs(x = k*r1, DJ(n, x)))*evalf(subs(x = k2*r1, DH(n, x)))*I^n*k*k2*r1^2-I^n*n^2*evalf(subs(x = k*r1, J(n, x)))*evalf(subs(x = k2*r1, H(n, x))))/WWVV; `αv4` := evalf(subs(x = k*r1, H(n, x)))*r1*n*omega/WWVV; `αv5` := -I*evalf(subs(x = k*r1, DH(n, x)))*r1^2*k*omega/WWVV; `αv6` := I*I^n*n*k*r1*(evalf(subs(x = k*r1, DJ(n, x)))*evalf(subs(x = k*r1, H(n, x)))-evalf(subs(x = k*r1, DH(n, x)))*evalf(subs(x = k*r1, J(n, x))))/WWVV; gv1 := rho1*(-evalf(subs(x = k*r1, D2H(n, x)))*k^2*r^2*(4*nu+3*xi)-3*evalf(subs(x = k*r1, DH(n, x)))*k*r1*xi+evalf(subs(x = k*r1, H(n, x)))*(-4*k^2*r1^2*nu-3*k^2*r1^2*xi+(3*I)*omega*r1^2-2*n^2*nu+3*n^2*xi))/(3*r1^2); gv2 := (6*rho1/(3*r1^2)*I)*n*nu*(evalf(subs(x = k2*r1, H(n, x)))-k2*r1*evalf(subs(x = k2*r1, DH(n, x)))); gv3 := rho1*(-I^n*evalf(subs(x = k*r1, D2J(n, x)))*k*r1^2*(4*nu+3*xi)+I^n*evalf(subs(x = k*r1, DJ(n, x)))*k*r1*(2*nu-3*xi)+I^n*evalf(subs(x = k*r1, J(n, x)))*(-4*k^2*r1^2*nu-3*k^2*r1^2*xi+(3*I)*omega*r1^2-2*n^2*nu+3*n^2*xi))/(3*r1^2); gv4 := (2*nu*rho1/r1^2*I)*n*(evalf(subs(x = k*r1, H(n, x)))-evalf(subs(x = k*r1, DH(n, x)))*k*r1); gv5 := nu*rho1*(evalf(subs(x = k2*r1, D2H(n, x)))*k2^2*r1^2-evalf(subs(x = k2*r1, D2H(n, x)))*k2*r1+evalf(subs(x = k2*r1, H(n, x)))*n^2)/r1^2; gv6 := (2*nu*rho1/r1^2*I)*n*I^n*(evalf(subs(x = k*r1, J(n, x)))-k*r1*evalf(subs(x = k*r1, DJ(n, x)))); E := matrix([[`αv1`*gv1+`αv4`*gv2+lambda(r1)/r1, `αv2`*gv1+`αv4`*gv2+I*n*lambda(r1)/r1], [`αv1`*gv4+`αv4`*gv5+I*n*mu(r1)/r1, `αv2`*gv4+`αv5`*gv5-mu(r1)/r1]]); G := vector([-gv1*`αv3`-gv2*`αv6`-gv3, -gv4*`αv3`-gv5*`αv6`-gv6]); e1 := (lambda2*n^2*evalf(subs(x = kl*r2, J(n, x)))-kl^2*r2^2*evalf(subs(x = kl*r2, D2J(n, x)))*(lambda2+2*mu2)-kl*lambda2*r2*evalf(subs(x = kl*r2, DJ(n, x))))/r2^2; e2 := (2*mu2*I)*n*(evalf(subs(x = kt*r2, J(n, x)))-kt*r2*evalf(subs(x = kt*r2, DJ(n, x))))/r2^2; e3 := (I*n*2)*(evalf(subs(x = kl*r2, J(n, x)))-kl*r2*evalf(subs(x = kl*r2, DJ(n, x))))/r2^2; e4 := (kt^2*r2^2*evalf(subs(x = kt*r2, D2J(n, x)))-kt*r2*evalf(subs(x = kt*r2, DJ(n, x)))+n^2*evalf(subs(x = kt*r2, J(n, x))))/r2^2; gamma1 := kt*r2*evalf(subs(x = kt*r2, DJ(n, x)))/WW; gamma2 := I*n*evalf(subs(x = kt*r2, J(n, x)))/WW; gamma3 := I*n*evalf(subs(x = kl*r2, J(n, x)))/WW; gamma4 := -kl*r2*evalf(subs(x = kl*r2, DJ(n, x)))/WW; WW := (kl*r2^2*evalf(subs(x = kl*r2, DJ(n, x)))*kt*evalf(subs(x = kt*r2, DJ(n, x)))-n^2*evalf(subs(x = kl*r2, J(n, x)))*evalf(subs(x = kt*r2, J(n, x))))/r2; F := matrix([[r2^2*(gamma1*e1+gamma3*e2+lambda(r2)/r2), r2^2*(gamma2*e1+gamma4*e2+I*n*lambda(r2)/r2)], [mu2*r2^2*(gamma1*e3+gamma3*e4+I*n*mu(r2)/(mu2*r2)), mu2*r2^2*(gamma2*e3+gamma4*e4-mu(r2)/(mu2*r2))]]); Ur1 := vector([U1(r1), U2(r1)]); Ur2 := vector([U1(r2), U2(r2)]); DUr1 := vector([Dx1(r1)+I*Dy1(r1), Dx2(r1)+I*Dy2(r1)]); DUr2 := vector([Dx1(r2)+I*Dy1(r2), Dx2(r2)+I*Dy2(r2)]); CCR1 := multiply(A1, DUr1); CCR2 := multiply(E, Ur1); CR := evalm(CCR1+CCR2); CCR11 := multiply(A1, DUr2); CCR22 := multiply(F, Ur2); CR2 := evalm(CCR11+CCR22); ggr1 := expand(evalc(Re(CR[1]))); ggr2 := expand(evalc(Im(CR[1]))); ggr3 := expand(evalc(Re(CR[2]))); ggr4 := expand(evalc(Im(CR[2]))); ggr5 := expand(evalc(Re(CR2[1]))); ggr6 := expand(evalc(Im(CR2[1]))); ggr7 := evalc(Re(CR2[2])); ggr8 := evalc(Im(CR2[2])); gr1 := subs(Dx1(r1) = (D(x1))(r1), Dx2(r1) = (D(x2))(r1), Dy1(r1) = (D(y1))(r1), Dy2(r1) = (D(y2))(r1), r = r1, ggr1); gr2 := subs(Dx1(r1) = (D(x1))(r1), Dx2(r1) = (D(x2))(r1), Dy1(r1) = (D(y1))(r1), Dy2(r1) = (D(y2))(r1), r = r1, ggr2); gr3 := subs(Dx1(r1) = (D(x1))(r1), Dx2(r1) = (D(x2))(r1), Dy1(r1) = (D(y1))(r1), Dy2(r1) = (D(y2))(r1), r = r1, ggr3); gr4 := subs(Dx1(r1) = (D(x1))(r1), Dx2(r1) = (D(x2))(r1), Dy1(r1) = (D(y1))(r1), Dy2(r1) = (D(y2))(r1), r = r1, ggr4); gr5 := subs(Dx1(r2) = (D(x1))(r2), Dx2(r2) = (D(x2))(r2), Dy1(r2) = (D(y1))(r2), Dy2(r2) = (D(y2))(r2), r = r2, ggr5); gr6 := subs(Dx1(r2) = (D(x1))(r2), Dx2(r2) = (D(x2))(r2), Dy1(r2) = (D(y1))(r2), Dy2(r2) = (D(y2))(r2), r = r2, ggr6); gr7 := subs(Dx1(r2) = (D(x1))(r2), Dx2(r2) = (D(x2))(r2), Dy1(r2) = (D(y1))(r2), Dy2(r2) = (D(y2))(r2), r = r2, ggr7); gr8 := subs(Dx1(r2) = (D(x1))(r2), Dx2(r2) = (D(x2))(r2), Dy1(r2) = (D(y1))(r2), Dy2(r2) = (D(y2))(r2), r = r2, ggr8); sys := p1 = 0, p2 = 0, p3 = 0, p4 = 0; Inits := gr3 = evalc(Re(G[2])), gr4 = evalc(Im(G[2])), gr1 = evalc(Re(G[1])), gr2 = evalc(Im(G[1])), gr5 = 0, gr6 = 0, gr7 = 0, gr8 = 0; dde := dsolve({Inits, sys}, numeric, [x1(r), x2(r), y1(r), y2(r)], method = bvp[trapdefer], 'maxmesh' = 5000)

1

 

5860000000.*r^2*(diff(diff(x1(r), r), r))+5860000000.*r*(diff(x1(r), r))-4880000000.*r*(diff(y2(r), r))+(-6840000000.+0.1972224000e11*r^3-0.1380556800e11*r^2)*x1(r)-(15217.76256*r^3-10652.43379*r^2)*y1(r)+6840000000.*y2(r) = 0, 5860000000.*r^2*(diff(diff(y1(r), r), r))+5860000000.*r*(diff(y1(r), r))+4880000000.*r*(diff(x2(r), r))+(15217.76256*r^3-10652.43379*r^2)*x1(r)+(-6840000000.+0.1972224000e11*r^3-0.1380556800e11*r^2)*y1(r)-6840000000.*x2(r) = 0, 980000000.0*r^2*(diff(diff(x2(r), r), r))-4880000000.*r*(diff(y1(r), r))+980000000.0*r*(diff(x2(r), r))-6840000000.*y1(r)+(-6840000000.+0.1972224000e11*r^3-0.1380556800e11*r^2)*x2(r)-(15217.76256*r^3-10652.43379*r^2)*y2(r) = 0, 980000000.0*r^2*(diff(diff(y2(r), r), r))+4880000000.*r*(diff(x1(r), r))+980000000.0*r*(diff(y2(r), r))+6840000000.*x1(r)+(15217.76256*r^3-10652.43379*r^2)*x2(r)+(-6840000000.+0.1972224000e11*r^3-0.1380556800e11*r^2)*y2(r) = 0

 

980000000.0*(D(x2))(1)-3407670.437*x1(1)-979699593.0*y1(1)-982493864.9*x2(1)+2501551.625*y2(1) = -1147.143928, 980000000.0*(D(y2))(1)+979699593.0*x1(1)-3407670.437*y1(1)-2501551.625*x2(1)-982493864.9*y2(1) = 522.0509891, 5860000000.*(D(x1))(1)+1012610130.*x1(1)+3433520814.*y1(1)-3395293.932*x2(1)-3899703885.*y2(1) = 1553476.957-0.8860949e-3*r^2, 5860000000.*(D(y1))(1)-3433520814.*x1(1)+1012610130.*y1(1)+3899703885.*x2(1)-3395293.932*y2(1) = 582234.6500+.6073438988*r^2, 3750400000.*(D(x1))(.8)-0.1805979289e11*x1(.8)-3057.354840*y1(.8)+182.8516896*x2(.8)+0.2220128109e11*y2(.8) = 0, 3750400000.*(D(y1))(.8)+3057.354840*x1(.8)-0.1805979289e11*y1(.8)-0.2220128109e11*x2(.8)+182.8516896*y2(.8) = 0, 627200000.0*(D(x2))(.8)-182.8520640*x1(.8)-0.2610528071e11*y1(.8)-0.2508771663e11*x2(.8)-607.0797125*y2(.8) = 0, 627200000.0*(D(y2))(.8)+0.2610528071e11*x1(.8)-182.8520640*y1(.8)+607.0797125*x2(.8)-0.2508771663e11*y2(.8) = 0

 

Error, (in dsolve/numeric/BVPSolve) unable to store '-HFloat(8.860193192958832e-4)+0.8860949e-3*r^2' when datatype=float[8]

 

``


 

Download ODU_v2.mw

 

I don't know how overcoming this error . Thank you. MyPackage := module() export f1, f2; local loc1; option package; f1 := proc() loc1 end proc; f2 := proc( v ) loc1 := v end proc; loc1 := 2; end module: savelib('MyPackage'); Error, cannot open archive, C:\Program Files\Maple 2018\lib, for writing. restart; with(MyPackage); Error, invalid input: with expects its 1st argument, pname, to be of type {`module`, package}, but received MyPackage
How to build a library (package) containing my own procedures ? Could you give me an example. Thank you.

Hello,

I want to create a plot of a gradient field of a function with singularities I want to draw arrows only where the function has values below 3,   or written: where f(x,y) < 3.

MY CODE:

potfeld := f(x, y) -> 1/sqrt(y^2+x^2);
   for i to 5 do
           for j to 3 do
                    if sqrt(i^2+j^2) <> 0 and sqrt((i-2)^2+j^2) <> 0 and potfeld(i, j) < 3
                       then P[i, j] := arrow(`<,>`(i, j), `<,>`((D[1](potfeld))(i, j), (D[2](potfeld))(i, j)))
                       else P[i, j] := arrow(`<,>`(i, j), `<,>`(.1, .1))
                   end if
           end do
    end do;
Pseq := seq(seq([P[k, l]], k = 1 .. 5), l = 1 .. 3);
display(Pseq, view = [1 .. 5, 1 .. 3], scaling = constrained);

 

RESULTS IN:
Error, cannot determine if this expression is true or false:  (1/2)*2^(1/2) < 3.0

The "(1/2)*2^(1/2)" are the value of the function potfeld(x,y) evaluated at (1,1).

I ask for your help, as with many changes and variations I have not managed to solve this issue.
+Thx and regards+

A line is deternined on one side by 16*x-2*y-11*z=0, 14*x-y-10*z=3 and on the other by (x-2)/3=(y-5)/2=(z-2)/4. Are they equivalent  ?  Thank you. 

I have made a procedure named Eratosthenes that will return a sequence of all the primes less than some given number N which must be a positive integer. However, I couldn't figure out the error but still, the code is not working either. Can anyone please go through my code to let me know if I have a mistake? Thanks.

Eratosthenes := proc (N::posint) local L, primeslist, n, k; description "Calculate all primes less than or equal to N"; L := Array(2 .. N, proc (i) options operator, arrow; true end proc); for n from 2 to trunc(sqrt(N)) do if L__n = true then for k from n while k*n <= N do `L__k*n` := false end do end if end do; primeslist := NULL; for n from 2 to N do if L__n = true then primeslist := primeslist, n end if end do; primeslist end proc:

Warning, ``L__k*n`` is implicitly declared local to procedure `Eratosthenes`

 

``NULL


 

Download issue.mwissue.mw

I have been trying to solve the following question using Maple for quite some time but couldn't do it. Any guide will be highly appreciated. 

P.S: I have just started learning it by myself in the last few days. I have been following An Introduction to Modern Mathematical Computing: With Maple. If you could suggest a more useful text, that would be helpful.

Please find the question below.

Hi,

I'm trying to use "Matlab()" command to convert Maple expression into Matlab's expression.

but for some reason it doesn't work.

it works for simple expressions but not this one. It is just a long expression with only some symbols, and the most basic math operations. I don't see why it fails.

It says: "Error, (in Translate) options... not recognized"

I'm attaching the maple code so you can see the error.  

The reason I'm using it is because Matlab could not solve the equation in the file (even numerically). So I wrote the same equation symbolically in Maple so I can copy the symbolic solutions to matlab and use them instead of matlab's 'solve' command.

Hope anyone can help with it.

Here's the code attached:

calc_theta.mw

Good day all.

If I generate a list containing (say) 100 elements or more, and each element is an ordered pair - is it possible to assign a letter to each element? The first 26 elements will have equal A to Z, the next 26 will take A1 to Z1, and so on.

For example if the list is [ [5,3], [2,5], ..., [3,1]], how do I construct it to become [A=[5,3], B=[2,5], ..., V3=[3,1]]?

Please see attached.

Thank's a lot for your time.

MaplePrimes_Label_Lists.mw

how to draw these 3 lines and then project them on the plans Oxy,Oxz,Oyz;
3 given lines a := [3*t-7, -2*t+4, 3*t+4]; b := [m+1, 2*m-9, -m-12];c:={x = -200/29-2*t, y = 114/29+3*t, z = 119/29+4*t}, how to show these lines and the projections on the 3 planes ? Thank you.

A := [1, -2, 3]:u := `<,>`(0, -2, 2):v := `<,>`(5, 8, -3):
PL := proc (A, u, v) local d, Det, AP, t, U, V;
AP := `<,>`(x-A[1], y-A[2], z-A[3]);
Matrix(`<|>`(`<,>`(AP), `<,>`(u), `<,>`(v)));
Det := LinearAlgebra:-Determinant(%); d := igcd(coeff(Det, x), coeff(Det, y), coeff(Det, z), tcoeff(Det));
print(`Une équation cartésienne du plan est :`);
t := Det/d; print([t = 0]);
print('Une*représentation*paramétrique*du*plan*est; -1');
U := convert(u, list); V := convert(v, list);
[x = lambda*U[1]+mu*V[1]+A[1], y = lambda*U[2]+mu*V[2]+A[2], z = lambda*U[3]+mu*V[3]+A[3]] end proc;
PL(A, u, v);

plan3p := proc (A::list, B::list, C::list)
local d, M, N, P, Mat, Det, t, U, V;
M := `<,>`(x-A[1], B[1]-C[1], C[1]-A[1]); N := `<,>`(y-A[2], B[2]-C[2], C[2]-A[2]); P := `<,>`(z-A[3], B[3]-C[3], C[3]-A[3]);
Mat := Matrix([M, N, P]);
Det := LinearAlgebra:-Determinant(%);
d := igcd(coeff(Det, x), coeff(Det, y), coeff(Det, z), tcoeff(Det));
print(`Une équation cartésienne du plan est :`);
t := Det/d; print([t = 0]); print('Une*représentation*paramétrique*du*plan*est; -1');
U := A-B; V := B-C;
[x = lambda*U[1]+mu*V[1]+A[1], y = lambda*U[2]+mu*V[2]+A[2], z = lambda*U[3]+mu*V[3]+A[3]] end proc;
A := [-6, 3, -2]; B := [5, 2, 1]; C := [2, 5, 2];plan3p(A, B, C);
How to know if these procedures are correct or not. Thank you.

We consider a fixed circle (C) tangent to a fixed line Δ at a given point O of this line. 
Circles Γ tangent to circles C in M and to the right Δ in N are studied.
 Show that the MN line passes through a fixed point I. Infer that the circles Γ remain orthogonal to a fixed circle.
My code is :
 restart; with(geometry);with(plots);
_EnvHorizontalName := 'x';_EnvVerticalName := 'y';
dist := proc (M, N) sqrt(Vdot(expand(M-N), expand(M-N))) end proc;
point(oo, 0, 3); p := 6;
point(N, 5, 0);
line(Delta, y = 0, [x, y]);
para := x^2 = 2*p*y;
solve(subs(x = 5, para), y); point(varpi, 5, 25/12);
line(alpha, [oo, varpi]); k := 3/(25/12);
point(M, (0+5*k)/(1+k), (3+25*k*(1/12))/(1+k)); 
circle(C, x^2+(y-3)^2 = 9, [x, y]);cir := implicitplot(x^2+(y-3)^2 = 9, x = -5 .. 5, y = -5 .. 7, color = blue);
Para := implicitplot(para, x = -40 .. 40, y = 0 .. 40, linestyle = 3, color = coral);
homothety(J, N, -k, M); coordinates(J);
circle(C1, (y-25/12)^2+(x-5)^2 = (25/12)^2, [x, y]);line(lNJ, [N, J]);
triangle(T1, [J, oo, M]); triangle(T2, [N, varpi, M]);
C1 := implicitplot((y-25/12)^2+(x-5)^2 = (25/12)^2, x = 2 .. 8, y = 0 .. 5, color = magenta);dr1 := draw([oo, Delta, varpi, N, M, J], printtext = true); dr2 := draw([alpha(color = black), lNJ(color = black), T1(color = green, filled = true), T2(color = green, filled = true)]);
inversion(M, M, C);
inversion(N, M, C);
Fig := proc (xOm)
local cir, c2, C2, C1, c3, C3, k, M, N, J, sol, dr, varpi;
global p, para, Para;
sol := solve(subs(x = xOm, para), y);
cir := (y-sol)^2+(x-xOm)^2 = sol^2; c2 := x^2+(y-3)^2 = 9;
geometry:-point(N, xOm, 0); sol := solve(subs(x = xOm, para), y);
geometry:-point(varpi, xOm, sol); k := 3/sol;
geometry:-point(M, xOm*k/(k+1), (3+k*sol)/(k+1));
geometry:-homothety(J, N, -k, M);
c3 := (x-(1/2)*xOm)^2+(y-3)^2 = (1/4)*dist(N, J)^2;
C1 := plots:-implicitplot(cir, x = -xOm .. 3*xOm, y = 0 .. 3*xOm, color = magenta);
C2 := plots:-implicitplot(c2, x = -xOm .. 2*xOm, y = 0 .. 2*xOm, color = blue);
C3 := plots:-implicitplot(c3, x = -xOm .. 2*xOm, y = 0 .. 2*xOm, color = blue);
dr := geometry:-draw([varpi, M, J]);
plots:-display([Para, C2, C1, C3, dr], view = [-xOm .. 3*xOm, -1 .. 3*xOm], axes = normal, scaling = constrained) end proc;

Fig(8);
display([seq(Fig(4+.8*i), i = 4 .. 15)]);
display({C1, Para, cir, dr1, dr2}, view = [-8 .. 8, -1 .. 8], axes = normal, scaling = constrained, size = [500, 500]);
I don't know what is that orthogonal circle to each tangent circles. Thank you to help me.

.

Hi !

Sorry but there is a bug in the "combine" command when combining double summations.
 Maple 2017,2018 and 2020 all give me a wrong answer. I have an old version of Maple which gives the correct answer.
I have put an example in the attached file.

bugcombine.mw

Best regards
Réjean 

restart;
with(plots); with(LinearAlgebra);
_EnvHorizontalName := 'x';

_EnvVerticalName := 'y';

x1,y1,x2,y2,x3,y3:=0,-3,3,1,5,-2:   
A := [x1, y1]: B := [x2, y2]: C := [x3, y3]:

Barycentre := proc (A, B, t) description "Barycentre de 2 points A(1) et B(t) dans le rapport t";
return [(1-t)*A[1]+t*B[1], (1-t)*A[2]+t*B[2]] end proc;
ellip := proc (r1, r2) local a, b, c, d, e, f, D, E, F, eq1, eq2, eq3, eq4, eq5, eq6, x0, y0, EE, r3, sol, Ff, Tg;
global A, B, C;
r3 := -1/(r2*r1);
D := Barycentre(C, B, 1/(1-r1)); E := Barycentre(A, C, 1/(1-r2)); F := Barycentre(B, A, 1/(1-r3));
Ff := proc (x, y) options operator, arrow; a*x^2+2*b*x*y+c*y^2+2*d*x+2*e*y+f end proc;
Tg := proc (x0, y0, x, y) options operator, arrow; a*x*x0+b*(x*y0+y*x0)+c*y*y0+d*(x+x0)+e*(y+y0)+f end proc;
eq1 := Ff(D[1], D[2]);
eq2 := Ff(E[1], E[2]);
eq3 := Ff(F[1], F[2]);
eq4 := Tg(F[1], F[2], x1, y1);
eq5 := Tg(D[1], D[2], x2, y2);
eq6 := Tg(E[1], E[2], x3, y3);
sol := op(solve([eq1, eq2, eq3, eq4, eq5, eq6], [a, b, c, d, e]));
assign(sol);
EE := subs(f = 1, Ff(x, y) = 0) end proc;

ellip(-1, -7); tri := plot([A, B, C, A], color = blue):
 
po := plot([A, B, C], style = point, symbolsize = 15, symbol = solidcircle, color = red);
tp := textplot([[A[], "A"], [B[], "B"], [C[], "C"]], 'align' = {'above', 'left'});
x := 'x'; y := 'y';
ELL := seq(implicitplot(ellip(-7/11-(1/11)*j, -1/17-3*j*(1/17)), x = 0 .. 5, y = -3 .. 1, color = ColorTools:-Color([rand()/10^12, rand()/10^12, rand()/10^12])), j = 1 .. 17);
display([tri, ELL, po, tp], view = [-.5 .. 5.5, -4 .. 1.5], axes = none, scaling = constrained, size = [500, 500]);
Explore(implicitplot(ellip(r1, r2), x = 0 .. 5, y = -3 .. 1), parameters = [r1 = -2.18 .. -.7, r2 = -3 .. -.23]);
Can you tell me why this last instruction does't work ? Thank you.
 

First 7 8 9 10 11 12 13 Last Page 9 of 62