JAMET

240 Reputation

3 Badges

4 years, 106 days

MaplePrimes Activity


These are questions asked by JAMET

Would you tel me why this code doesn't work : the  lenghts of BC and BD are not constant. Thank you very much.
restart;
with(plots);
with(plottools);
AB := 39;
BC := 140;
BD := 140;
local(D);
Vdot := proc(U, V) local i; add(U[i]*V[i], i = 1 .. 2); end proc;
dist := proc(M, N) sqrt(Vdot(expand(M - N), expand(M - N))); end proc;
Fig := proc(alpha)
local cir, R, BC, BD, AC, AD, lAC, A, lBC, lAB, lBD, beta, B, C, Cc, Dd, D, Aa, Bb, F1, F2, d, k, h, i, Pb, Ph, pb1, ph1, Qb, Qh, qh1, qb1, p1, P1, p2, P2, p3, P3, p4, P4, q1, Q1, q2, Q2, q3, Q3, q4, Q4, cy1, cy2, cy3, cy4, tA, tB, tC, tD;
A := [0, 0]; R := 39; d := 83; BC := 140; BD := 140;
B := [R*cos(alpha), R*sin(alpha)];
k := BC/R; h := 1/2*sqrt(2);
Ph := [h*(R + BC), h*(R + BC)];
Pb := [h*(-R + BC), h*(-R + BC)];
Qh := [-h*(R + BC), h*(R + BC)];
Qb := [-h*(-R + BC), h*(-R + BC)];
P1 := [Ph[1] - 1/2*d*h, Ph[2] + 1/2*d*h];
P2 := [Ph[1] + 1/2*d*h, Ph[2] - 1/2*d*h];
P3 := [Pb[1] - 1/2*d*h, Pb[2] + 1/2*d*h];
P4 := [Pb[1] + 1/2*d*h, Pb[2] - 1/2*d*h];
Q1 := [Qh[1] + 1/2*d*h, Qh[2] + 1/2*d*h];
Q2 := [Qh[1] - 1/2*d*h, Qh[2] - 1/2*d*h];
Q3 := [Qb[1] + 1/2*d*h, Qb[2] + 1/2*d*h];
Q4 := [Qb[1] - 1/2*d*h, Qb[2] - 1/2*d*h];
cir := circle(A, R, color = black, linestyle = longdash);
F1 := plot(x, x = -R .. R + BC, color = black, linestyle = longdash);
F2 := plot(-x, x = -R - BC .. R, color = black, linestyle = longdash);
AC := R*(cos(alpha) + sqrt(k^2 - sin(alpha)^2));
C := [h . AC, h . AC];
AD := R*(cos(Pi - alpha) + sqrt(k^2 - sin(Pi - alpha)^2));
D := [-h*AD, h*AD]; lBC := plot([B, C], color = red, thickness = 4);
lAB := plot([A, B], color = red, thickness = 4); print(evalf(dist(B, C)), evalf(dist(B, D)));
lBD := plot([B, D], color = red, thickness = 4);
pb1 := pointplot(Pb, symbol = solidcircle, symbolsize = 5, color = black);
ph1 := pointplot(Ph, symbol = solidcircle, symbolsize = 5, color = black);
qb1 := pointplot(Qb, symbol = solidcircle, symbolsize = 5, color = black);
qh1 := pointplot(Qh, symbol = solidcircle, symbolsize = 5, color = black);
p1 := pointplot(P1, symbol = solidcircle, symbolsize = 10, color = black);
p2 := pointplot(P2, symbol = solidcircle, symbolsize = 10, color = black);
p3 := pointplot(P3, symbol = solidcircle, symbolsize = 10, color = black);
p4 := pointplot(P4, symbol = solidcircle, symbolsize = 10, color = black);
q1 := pointplot(Q1, symbol = solidcircle, symbolsize = 10, color = black);
q2 := pointplot(Q2, symbol = solidcircle, symbolsize = 10, color = black);
q3 := pointplot(Q3, symbol = solidcircle, symbolsize = 10, color = black);
q4 := pointplot(Q4, symbol = solidcircle, symbolsize = 10, color = black);
Aa := pointplot(A, symbol = solidcircle, symbolsize = 12, color = blue);
Bb := pointplot(B, symbol = solidcircle, symbolsize = 12, color = blue);
Cc := pointplot(C, symbol = solidcircle, symbolsize = 12, color = blue);
Dd := pointplot(D, symbol = solidcircle, symbolsize = 12, color = blue);
cy1 := plot([P1, P3], color = black, thickness = 8); cy2 := plot([P2, P4], color = black, thickness = 8);
cy3 := plot([Q1, Q3], color = black, thickness = 8); cy4 := plot([Q2, Q4], color = black, thickness = 8);
tA := textplot([0, 0, "A"], 'align' = {'above', 'right'});
tB := textplot([B[1], B[2], "B"], 'align' = {'above', 'right'});
tC := textplot([C[1], C[2], "C"], 'align' = {'above', 'right'});
tD := textplot([D[1], D[2], "D"], 'align' = {'above', 'right'});
display([cir, F1, F2, pb1, ph1, qb1, qh1, p1, p2, p3, p4, q1, q2, q3, q4, Aa, Bb, Cc, Dd, lAB, lBC, lBD, cy1, cy2, cy3, cy4, tA, tB, tC, tD], scaling = constrained); end proc;
Fig(Pi/3);
display([seq(Fig((2*alpha*Pi)/50), alpha = 0 .. 50)], insequence = true, axes = none);

Justify that 2 vectors (1,1) and (1,2) are an R² base; How to write calculations correctly ?
<x, y> = lambda*<1, 1> + mu*<1, 2>:
 solve({lambda+mu=x,lambda+2*mu=y},{lambda,mu}):
 <x, y> := (2*x - y)*<1, 1> + (-x + y)*<1, 2>:
Thank you.

restart;In this code "add" is a trouble.
A := Matrix([[1, 2, 1, 3], [1, 1, 2, 1], [1, -2, 5, -11]]);
cs := LinearAlgebra:-ColumnSpace(A);
cnames := [seq(c || j, j = 1 .. numelems(cs))];
cvals := seq(solve([entries(A[() .. (), k] -~ add(`*`~(cnames, cs)), 'nolist')], cnames)[], k = 1 .. op([1, 2], A));
seq(add*rhs~(cvals[k]) *~ cs, k = 1 .. op([1, 2], A));
add does not play its role. Why. Thank you.

I try to find kernel and image of a application whose i know the matrix.
restart;
with(LinearAlgebra);
A := Matrix([[1, 1, 1, -1], [-1, 1, -1, -1], [1, -1, -1, -1], [-1, -1, 1, 3]]);
k := op(NullSpace(A));#kernel
MatrixVectorMultiply(A, k);#check
C := op(ColumnSpace(A));
X := <x, y, z, t>;
F := MatrixVectorMultiply(A, X) - a*C[1] - b*C[2] - c*C[2];
G := op(convert(F, list));
solve({seq(G[i] = 0, i = 1 .. 4)}, {a, b, c}); why there is no solution ? Thank you.

How is the matrix of the affinity of base the plan of equation x+2*y-z=1, of direction u <1,0,-1>and of ratio 2 determined? Thank you.

1 2 3 4 5 6 7 Last Page 1 of 16