JAMET

410 Reputation

4 Badges

7 years, 64 days

MaplePrimes Activity


These are questions asked by JAMET

restart:with(geometry):with(plots): 
> S:=segment:L:=line:Per:=PerpendicularLine: 
> R:=5:xA:=0:yA:=0:point(A,xA,yA):xI:=R/3:yI:=0:point(I1,xI,yI): 
> circle(C,[A,R]): 

> quadri:=proc(t) 
> local xM,yM,xN,yN,xE,yE,dr1: 
> xM:=evalf(R*cos(t)):yM:=evalf(R*sin(t)):point(M,xM,yM):L(lMI,[M,I1]): 
> intersection('h',C,lMI,[M,N]):L(lAM,[A,M]):L(lAN,[A,N]): 
> Per(lME,M,lAM):Per(lNE,N,lAN):intersection(E,lME,lNE): 
> S(sAM,[A,M]):S(sAN,[A,N]):S(sME,[M,E]):S(sNE,[N,E]): 
> dr1:=draw({lMI(color=blue),sAM(color=black),sAN(color=black), 
> sME,sNE}): 
> display({dr1}): 
> end: 
  
> dr:=draw({C},view=[-6..17,-10..6]): 
> display([dr,quadri(0.7),quadri(1),quadri(1.2)],view=[-6..17,-10..6]); Thanks you.

E := proc (n::posint)
local L, x, y, z, p;
p := n; L := NULL;
assume(x::nonnegint, y::nonnegint, z::nonnegint);
assume(x <= y and y < =z);
for x from 1 to irem(p, 2) do
for y from x to irem(p, 2) do
for z from y to irem(p, 2) do
if x+y+z = p then L := L, [x, y, z] end if
end do
end do
end do;
return L end proc:
This procedure don't work. I would like E(9)={(1,4,4),(2,3,4),(3,3,3)} then E(2019), E(2022). Thank you.

with(plots); R := 5; alpha := (1/9)*Pi; beta := (1/3)*Pi; n := 100; dt := 2*Pi/n; C1 := plot([R*cos(t), R*sin(t), t = 0 .. 2*Pi], color = blue); O := [0, 0]; M := [R*cos(beta), R*sin(beta)]; A := [R*cos(alpha), R*sin(alpha)]; B := [R*cos(alpha+Pi), R*sin(alpha+Pi)]; AB := plot([A, B]); OM := plot([O, M]); P := [R*cos(t0*dt), R*sin(t0*dt)]; Q := [R*cos(dt*t0+Pi), R*sin(dt*t0+Pi)]; diamob := seq(plot([P, Q], color = green), t0 = 0 .. n); MP := plot([M, P]); MQ := plot([M, Q]); tp := textplot([[A[1]+.3, A[2], "A"], [B[1]-.3, B[2], "B"], [M[1]+.3, M[2]+.3, "M"]]); display({AB, C1, OM, tp, display(diamob, MP, MQ, insequence = true)}, scaling = constrained):
I wish animate MPand MQ.

with(plots):R := 5; alpha := (1/9)*Pi;
C1 := plot([R*cos(t), R*sin(t), t = 0 .. 2*Pi], color = blue);
A := [R*cos(alpha), R*sin(alpha)]; B := [R*cos(alpha+Pi), R*sin(alpha+Pi)]; AB := plot([A, B], scaling = constrained);
display({AB, C1}, scaling = constrained);# bad drawing

 

Duo:=proc(a)  #a nombre congruent connu
local u,v,n,m,k,t:
t:=8000:
for m to t do
  for n to m do
    if (igcd(m,n)=1 and m>n) then
      u:=(m^2-n^2-2*m*n)^2:v:=(m^2+n^2)^2:
      k:=op(2,sqrt(v-u))^2: # k nombre congruent réduit
        if k=a then return (m,n): break 
        elif n=t then break fi:
    fi:
  od:
od:
end:

Duo(30);
                              3, 2
Duo(1794);
                             26, 23
Duo(6);
                              2, 1
u, v, w sont des carrés en progression arithmétique dont la raison est un nombre congruent
Procédure permettant de trouver un triplet pythagoricien primitif correspondant au nombre congruent a connu
TriPy:=proc(m,n)# triangles pythagoriciens
local a,a1,b1,c1,d,k,q,u,v,w:
 if (igcd(m,n)=1 and m>n) then
 u:=(m^2-n^2-2*m*n)^2:v:=(m^2+n^2)^2:w:=(m^2-n^2+2*m*n)^2:
 a:=(op(2,sqrt(v-u)))^2:#nombre congruent réduit
 a1:=2*m*n:b1:=(m^2-n^2):c1:=m^2+n^2:
 q:=sqrt((v-u)/a)/2:#rapport de réduction
 print(a1/q,b1/q,c1/q):fi
end:
TriPy(Duo(34));
                              17  145
                          24, --, ---
                              6    6 

TriPy(Duo(39));
                          156  5  313
                          ---, -, ---
                           5   2  10 

TriPy(Duo(111));
                         444  35  1513
                         ---, --, ----
                         35   2    70 
TriPy(Duo(1794));
                         1196      1205
                         ----, 21, ----
                          7         7  
TriPy(Duo(23));don't work, "part dans les choux"

First 28 29 30 31 32 Page 30 of 32