JAMET

370 Reputation

4 Badges

6 years, 110 days

MaplePrimes Activity


These are replies submitted by JAMET

restart; with(plots): _EnvHorizontalName := 'x';_EnvVerticalName := 'y'; _EnvHorizontalName := x _EnvVerticalName := y EQ := proc (M, N) RETURN((y-M[2])/(x-M[1]) = (N[2]-M[2])/(N[1]-M[1])) end proc: a := 5: b := 7; k := 9; A := [a, 0]; B := [0, b]; b := 7 k := 9 A := [5, 0] B := [0, 7] P := [t, 0]; Q := [0, k/t]; P := [t, 0] [ 9] Q := [0, -] [ t] 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]; [5 1 (1/2) ] M := [- + - 65 , 5] [2 2 ] R := sqrt(cen[1]^2+cen[2]^2): beta := arctan(diff(solve(EQ(M, cen), y), x)): 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: PQ2 := simplify(x*(-a*b+b*tp+k)+y*tp*(tp-a)-tp*(-a*b+b*tp+k)) = 0: P2 := [tp, 0]: Q2 := [0, k/tp]: 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 = orange); 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): CIR := implicitplot(cir, x = -4 .. 8, y = -4 .. 12, color = red): 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 := 7: display([seq(Fig(2*i*Pi/n), i = 0 .. n), Fig(beta), CIR, DrPQ1, DrPQ2, Points, T], scaling = constrained, size = [500, 500]): display([Fig(beta), CIR, DrPQ1, DrPQ2, Points, T], scaling = constrained, size = [500, 500]); I hope my program will not be transform in pap. I am trying the elements of the ellipse : focus, a, b. Thank you.

Why and how the coordinates of H are given from the outset in the 4th line of 1.mw ?
THank you.

Thank you. I should like to find the affixe with complex only.

SORRY, I apologize very much I made a confusion between z1*z2 and z1+z2

This true that( z1^2+z2^2+2*z1*z2)/(z1+z2)=z2/z1+z1/z2+2 how to obtain this egality ? Thank you.

How to show directly that is((z1+z2)^2/(z1+z2)=z2/z1+z1/z2+2) is true ? Thank you.

How to find n triples with such a procedure :
Tri:=proc(Y,n)#Y a triple
local m:
global &*:#coming from previus calculations
m:=Y&*(Y&*(Y&*Y))):#n times
RETURN(m)
end:Thank you for your help.

I have an error for the third line : error, invalid input: f expects its 1st argument, T, to be of type And(list...) but received p.

How to correct. Thank you.

Thank you. An other question : represent module points between 1 and 2 and argument points Pi/4 ?

Sorry for my errors.
I tried to adapt the program to cubes 
 

Cubes := `~`[`^`]([`$`(1 .. 10)], 3); Cubes := [1, 8, 27, 64, 125, 216, 343, 512, 729, 1000] for n from 100 to 100+13^(3) do found:=false ; for m to nops(Cubes) do for c in combinat:-choose(Cubes,m) do if add(c)=n then printf(cat("\n%d = %d^3", " + %d^3"$(m-1)),n,root~(3,c)[]); found:=true fi until found until found; if not found then printf("\n%d: no solution",n) fi od: But it doesn't work.

restart; Squares := `~`[`^`]([`$`(1 .. 12)], 2); Squares := [1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144] for n from 129 to 129+13^(2) do found=false ; for m to nops(Squares) do for c in combinat:-choose(Squares,m) do if add(x,x=c)=n then printf(cat("\\n%d = %d^2", " + %d^2"$(m-1)),n,sqrt~(c)[]); found=true fi until found until found; if not found then printf("\\n%d: no solution",n) fi od: How to avoid this message ? Error cannot determinate if this expression is true or false : found. Thank you.

In spice of this changing, there is : Error, cannot determine if the expressionis true or false : found

still an error ! Thank you

I have this error with this last program; How to correct it ? Thank you.

For a more concise response could use fprint ? Thank you.

5 6 7 8 9 Page 7 of 9