toandhsp

300 Reputation

11 Badges

12 years, 287 days

MaplePrimes Activity


These are answers submitted by toandhsp

I used minimize(sqrt(x+1)+sqrt(x+2),x>=-1);  I got minimum of t = 1.

> f:=x->sqrt(x+1)+sqrt(x+2)+2*sqrt((x+1)*(x+2))+2*x-3:

 sol:=solve(t=sqrt(x+1)+sqrt(x+2),x):

 A:=f(sol):

 simplify(A) assuming t > 1;

Thank you.

You try this code. 
h := x-> exp(x) ;
> evalf(h(2));

7.389056099

Orthocenter of a triangle is point of intersection three altitude of that triangle. 
The first, we write the equation of the  altitude draw from A. This line is line of intersection of two planes: The plane (ABC) and the plane (P) passing through the point A and perpendicular to the line BC. Note that, (P) take the vector BC as NormalVector. Similarly, we write the equation of the plane (Q) passing the point B and perpendicular to the line AC. The coordinates orthocenter H are the solution of the system of the equations contains three equations: The equation of the planes ABC, (P) and (Q). I hope, you understand my explaination.

> restart:

with(LinearAlgebra):

A:=<2 , -2 , 0>: B:=<4 , 2 , 5>: C:=<-1 , -3 , 0>: M:=x*A+y*B+z*C:

{DotProduct(B-A,C-M)=0, DotProduct(C-A,B-M)=0, x+y+z = 1}:

solve({DotProduct(B-A,C-M)=0, DotProduct(C-A,B-M)=0, x+y+z = 1}): assign(%): M:

'M'=[seq(M[i],i=1..3)];

 

I am sorry. You use this code

> restart:

with(geom3d):

point(A,2 , -2 , 0):

point(B,4 , 2 , 5):

 point(C,-1 , -3 , 0):

triangle(ABC,[A,B,C]):

IsRegular(ABC);

IsRightTriangle(ABC);

line(AB,[A,B],t):

line(BC,[B,C],t):

u:=ParallelVector(AB):

v:=ParallelVector(BC):

eq1:=Equation(plane(P,[C,u],[x,y,z])):

eq2:=Equation(plane(Q,[A,v],[x,y,z])):

eq3:=sort(Equation(plane(ABC,[A,B,C],[x,y,z]))):

hpt:=solve([eq1,eq2,eq3],[x,y,z]):

point(M,x,y,z):

coordinates(point(H,subs(hpt[1],coordinates(M))));

Equation(line(d,[H,ABC],t));

 

 

You can use this code.

> restart:

with(LinearAlgebra):

A:=<2 , -2 , 0>: B:=<4 , 2 , 5>: C:=<-1 , -3 , 0>: M:=x*A+y*B+z*C:

solve({Norm(A-M,2)=Norm(B-M,2), Norm(C-M,2)=Norm(B-M,2), x+y+z = 1}): assign(%):

'M'=[seq(M[i],i=1..3)];

 

I prepaired your problem, because my computer run too long. You can try this code for your problem.

> restart;

L:=[]:

for a from 1 to 30  do

for b from 1 to 30  do

for c from 1 to 30  do  if  type(a,integer) and type(b,integer)and type(c,integer) and 2*a+3*b+10*c=30 then

L:=[op(L), [a,b,c]] fi;

od: od: od:

nops(L);  L;

 

I wrote the code.

solve([u1+6*d+u1+14*d=60,(u1+3*d)^2 + (u1+11*d)^2=1170],[u1,d]);

> restart;with(geom3d):

point(A,1,-4,3):

point(B,3,-2,3):

point(C,2, 1, 1):point(M,a,b,c):

eq1:=distance(A,M) = distance(B,M):

eq2:=distance(A,M) = distance(C,M):

eq3:=Equation(plane(ABC,[A,B,C],[a,b,c])):

sys:=solve([eq1,eq2,eq3],[a,b,c]):

coordinates(point(M,eval(coordinates(M), op(sys))));

triangle(ABC,[A,B,C]):

IsEquilateral(ABC);

IsRightTriangle(ABC);

k:=lcm(denom(xcoord(M)),denom(ycoord(M)),denom(zcoord(M))):

point(o,0,0,0):

homothety(T, ABC, k, o):

map(coordinates,DefinedAs(T));

coordinates(homothety(H, M, k, o));

 

 

> restart;with(geom3d):

point(A,2,8,2):

point(B,4,-8,12):

point(C,2,6,4):point(M,a,b,c):

eq1:=distance(A,M) = distance(B,M):

eq2:=distance(A,M) = distance(C,M):

eq3:=Equation(plane(ABC,[A,B,C],[a,b,c])):

sys:=solve([eq1,eq2,eq3],[a,b,c]):

coordinates(point(M,eval(coordinates(M), op(sys))));

triangle(ABC,[A,B,C]):

IsEquilateral(ABC);

IsRightTriangle(ABC);

 

 

I used Derive and got the answer ln(3)/20. We can put t = x^5.

 

> resrart:

N:=5:

L:=[]:

for x1 from -N to N do

for y1 from x1 to N do

for z1 from y1 to N do

for x2 from -N to N do

for y2 from -N to N do

for z2 from -N to N do

a:=x1^2+y1^2+z1^2:

b:=x2^2+y2^2+z2^2:

c:=a+b-2*sqrt(a*b)*cos(Pi/6):

d:= a+c-2*sqrt(a*c)*cos(Pi/6):

if type(a, positive) and type(b, positive) and   c=(x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2 and b = d then L:=[op(L), [[0, 0, 0], [x1, y1, z1], [x2, y2, z2]]]: fi:

od: od: od: od: od: od:

nops(L);

L;

with(geom3d):

W:=L[12];

point(o,op(1,W)):

point(A,op(2,W)):

point(B,op(3,W)):

triangle(T,[o,A,B]):

simplify(FindAngle(o,T));

simplify(FindAngle(A,T));

simplify(FindAngle(B,T));

point(R,1,-1,-3):

coordinates(reflection(E,o,R));

coordinates(reflection(F,A,R));

coordinates(reflection(G,B,R));

 

I added  the command d:= a+c-2*sqrt(a*c)*cos(Pi/6): in order to find three angles of the triangle. Now i want to make a triagle which measure the two angles are  Pi/4, 2*Pi/3, this code is not run, because the coordinates ara not integer numbers.  Please write me a program to create a triangle as above. Thank you.

 

Thank you very much.

In the following code

> N:=5:

L:=[]:

 for x1 from -N to N do

 for y1 from x1 to N do

 for z1 from y1 to N do

 for x2 from -N to N do

 for y2 from -N to N do

 for z2 from -N to N do

 a:=x1^2+y1^2+z1^2:

 b:=x2^2+y2^2+z2^2:

 c:=a+b-2*sqrt(a*b)*cos(3*Pi/4):

 if type(a, positive) and type(b, positive) and c=(x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2 then L:=[op(L), {[0, 0, 0], [x1, y1, z1], [x2, y2, z2]}]: fi:

 od: od: od: od: od: od:

 nops(L);

 L;

> with(geom3d):

W:=L[10];

point(o,op(2,W)):

point(A,op(1,W)):

point(B,op(3,W)):

triangle(T,[o,A,B]):

simplify(FindAngle(T,o));

Please help me some following questions:

1) in the command

L:=[op(L), {[0, 0, 0], [x1, y1, z1], [x2, y2, z2]}]:

[0,0,0] is ranked in first position, but some options L, Maple out put [0,0,0] is ranked in second position. I want [0,0,0] is always in first position.

2) c:=a+b-2*sqrt(a*b)*cos(3*Pi/4): 

i input mesure of angle AoB equal to 3*Pi/4, but Maple out put is Pi/4.

Plesae help me. Thank you very much.

 

 

 

> restart:

N_square:=proc(N)

 local x1, y1, z1, x2, y2, z2, x3, y3, z3, k, n, a;

 global L;

 k:=0:

 L:=[]:

 for n while k<N do

 for x1 from -n to n while k<N do

 for y1 from -n to n while k<N do

 for z1 from -n to n while k<N do

 for x2 from -n to n while k<N do

 for y2 from -n to n while k<N do

 for z2 from -n to n while k<N do

 for x3 from -n to n while k<N do

 for y3 from -n to n while k<N do

 for z3 from -n to n while k<N do

 a:=x1^2+y1^2+z1^2:

 if a>0 and a=x3^2+y3^2+z3^2 and a=(x2-x1)^2+(y2-y1)^2+(z2-z1)^2 and a=(x3-x2)^2+(y3-y2)^2+(z3-z2)^2 and x2=x1+x3 and y2=y1+y3 and z2=z1+z3 and 2*a = x2^2 + y2^2 + z2^2 then

 L:=[op(L),{[0,0,0], [x1, y1, z1], [x2, y2, z2], [x3, y3, z3]}]: k:=nops(L): fi:

 od: od: od: od: od: od: od: od: od: od:

end proc:

 Example:

 t:=time():

 N_square(10):

 L[8..10];

 Time=cat(convert(time()-t, symbol),`  sec`);


> with(geom3d):

point(A,op(1,L[1])):

point(B,op(2,L[1])):

point(C,op(3,L[1])):

point(E,op(4,L[1])):

triangle(T1,[A,B,C]):

IsRightTriangle(T1);

triangle(T2,[A,B,E]):

IsRightTriangle(T2);

plane(ABC,[A,B,C],[x,y,z]):

IsOnObject(E,ABC);


 I don't like this program, because there are too many equal numbers in coordinates of the vertices.  I like coordinates have the form [[0, 0, 0], [6, 3, -2], [9, 1, 4], [3, -2, 6]]. Please comment to me.

1 2 3 4 5 6 7 Page 3 of 9