Etude d'un cas particulier
a := 5: b := 7:
k := 9:
A := [a, 0]: B := [0, b]: #A et B fixes
P := [t, 0]: Q := [0, k/t]:#P et Q 2 points mobiles
cir := -a*x-b*y+x^2+y^2 = 0:
sol := solve(subs(y = 5, cir), x):
cen := [solve(diff(cir, x)), solve(diff(cir, y))]:
x0 := sol[1]: y0 := 5:
M := [x0, y0]:
R := sqrt(cen[1]^2+cen[2]^2):
beta := arctan(diff(solve(EQ(M, cen), y), x)):
Recherche des valeurs de t pour que les 2 droites soient perpendiculaires
eq := t^2*(y0-b)+t*(a*b-a*y0+b*x0-k)-x0*(a*b-k) = 0;
sol := solve(eq, t);
t := sol[1]; tp := sol[2];
P1 := [t, 0]; Q1 := [0, k/t];
PQ1 := simplify(x*(-a*b+b*t+k)+y*t*(t-a)-t*(-a*b+b*t+k)) = 0:#1ere tangente
PQ2 := simplify(x*(-a*b+b*tp+k)+y*tp*(tp-a)-tp*(-a*b+b*tp+k)) = 0:#2ième tangente
P2 := [tp, 0]; Q2 := [0, k/tp];
CIR := implicitplot(cir, x = -4 .. 8, y = -4 .. 12, color = red);
Fig := proc (alpha) local Dr1, DR1, Dr2, DR2, N, u0, v0, Po, t, tp, sol; global a, b, k, cen, R; u0 := cen[1]+R*cos(alpha); v0 := cen[2]+R*sin(alpha); N := [u0, v0]; sol := solve(t^2*(v0-b)+t*(b*u0-a*v0+a*b-k)-u0*(a*b-k) = 0, t); t := sol[1]; tp := sol[2]; Dr1 := simplify(x*(-a*b+b*t+k)+y*t*(t-a)-t*(-a*b+b*t+k)) = 0; DR1 := implicitplot(Dr1, x = -4 .. 8, y = -4 .. 12, color = brown); Dr2 := simplify(x*(-a*b+b*tp+k)+y*tp*(tp-a)-tp*(-a*b+b*tp+k)) = 0; DR2 := implicitplot(Dr2, x = -4 .. 8, y = -4 .. 12, color = pink); Po := pointplot([N[]], symbol = solidcircle, color = [black], symbolsize = 8); display([Po, DR1, DR2]) end proc;
DrPQ1 := implicitplot(PQ1, x = -4 .. 22, y = -4 .. 12, color = blue);
DrPQ2 := implicitplot(PQ2, x = -4 .. 22, y = -4 .. 12, color = blue);
Points := pointplot([A[], B[], M[], P1[], P2[], Q1[], Q2[], cen[]], symbol = solidcircle, color = [green], symbolsize = 10);
T := plots:-textplot([[A[], "A"], [B[], "B"], [M[], "M"], [P1[], "P1"], [P2[], "P2"], [Q1[], "Q1"], [Q2[], "Q2"], [cen[], "cen"]], font = [times, 10], align = {below, left});
n := 19;
display([seq(Fig(2*i*Pi/n), i = 0 .. n), Fig(beta), CIR, DrPQ1, DrPQ2, Points, T], scaling = constrained, size = [500, 500]);
I would find out the focus of the ellipse. Thank you.
Dear friends, please I would like to ask for your help with the following problem:
I need to invoke the number of elements of an Array working with parallel programming in the task programming model. I've tried to used the command rtable_num_elems as it is contained in the thread safe functions lists. However, Maple does not recognize it as I obtain the error "Bad index into array". Using the same code, I've substituted the array for a list and rtable_num_elems for nops and the code works perfectly. What could I be doing wrong? I need to use arrays given the extension of the data I'm handling.
Many thanks for your kind help.
Anyone have any thoughts on how I can combine these two terms? (see screen shot) The error message implies the units are somehow not really the same but there is no help page for this error. Any insight would be appreciated. Thanks.
Here is the file: units_issue.mw