Kitonum

21435 Reputation

26 Badges

17 years, 22 days

MaplePrimes Activity


These are replies submitted by Kitonum

@minhthien2016  Geometrically, all the examples vv provided differ little from each other. All of these tetrahedrons are similar to your original example  (0, 0, 0), (3, 0, 0), (0, 5, 0), (0, 0, 14) . They are obtained from your original example by shifting by some vector, stretching and rotating in space. The easiest way to see this is by plotting. The code below plots your example and the first example from vv's code:

restart;
A:=plottools:-tetrahedron([[0,0,0],[3,0,0],[0,5,0],[0,0,14]]):
B:=plottools:-tetrahedron([[-9,1,-7],[-18,-17,59],[-79,91,8],[243,183,77]]):
plots:-display(< A | B >, scaling=constrained);

 
Below is an example of a tetrahedron that is not in my previous answer. Its inscribed sphere has  unit radius and its center is [4, 2, 1] :

A:=plottools:-tetrahedron([[0,0,0],[5,0,0],[5,5,0],[5,3,4]]):
B:=plottools:-sphere([4, 2, 1], 1):
plots:-display(A,B, scaling=constrained, transparency=0.3, axes=normal, view=[0..5.5,0..5.5,0..4.3]);


I don't know of any other way to get substantially different examples than "brute force".

@mehran rajabi 

restart;
asympt(1/(x^2-1), x, 10);

# Or
Sum(1/x^(2*n), n=1..infinity);

# Or automatically
convert(1/(x^2-1), FormalPowerSeries, x=infinity);

 

 

@vv  Thanks for the helpful comment. I tweaked the code a bit. Now it immediately returns the exact single solution.

@Carl Love  You wrote "There are no real roots". If  fsolve  cannot find a real root, this does not mean that there are no real roots.

Example (in Maple 2018):

fsolve(x^1000-1000^x-1, x=999..1001);
evalf(eval(x^1000-1000^x-1, x=999));
evalf(eval(x^1000-1000^x-1, x=1001));

                                           fsolve(x^1000-1000^x-1, x, 999 .. 1001)
                                                        3.666954248*10^2999
                                                       -9.972830761*10^3002

@BennyMopps  Back quotes are used to get the prefix notation of a operator.

Examples:

`$`(a,4);
a$4;
`+`(a,b);
`*`(a,b,c);

 

@robertocooper 

From help:  "The name  `if`  is an alias for  ifelse . When using this name,  if  must be enclosed in back quotes (left single quotes) because  if  is a Maple reserved word".

See help on   ifelse  for detailes.

@Preben Alsholm The correct answer to the question posed depends on the interpretation (positive or negative). I understood this question in the following sense: choose roots in front of which there is a plus sign. If OP meant any other meaning, then let he just clarify the question. For example, you can put the question like this: find the parameters values at which a given root takes a positive (negative) value.

@AHSAN  Read carefully my answer where I explained the reason for the error in your worksheet. The derivative is needed to prove that the function strictly decreases for all  lambda>1 , which proves the uniqueness of the root . Pay attention to the last command  Student:-NumericalAnalysis:-Bisection , where at each step the segment for isolating the root is halved.

Below is an adjustment for your code. I chose the  [1,2]  interval, since at its ends the expression P takes on values of different signs:

restart; 
with(Student[NumericalAnalysis]): 
P := (-216*sqrt(2)*lambda^2*(lambda-4/3)*arctan((1/2)*sqrt(6*lambda-2)*sqrt(2))-108*Pi*lambda^2*(lambda-4/3)*sqrt(2)+(-12*lambda+16)*(6*lambda-2)^(3/2)+(-40*lambda+32)*sqrt(6*lambda-2))/(576*lambda^2)+1/(6*lambda); 
plot(P, lambda = 0 .. 2, size = [600, 250]); 
FalsePosition(evalf(P), [1, 2], tolerance = 10^(-2));

                                               1.376882139

@binbagsss 

You are using  alias  incorrectly. Should be

restart;
alias(h=h(x), V=V(h(x)));
diff(V, x);
convert(%, diff);

 

@MDD  Here is a more automatic solution to your second example where  n  could be any positive integer, not necessary  n=3 :

restart;
A:=[(a*x[1, 1] + E[1, 1])*(E[1, 1] + (a + 2)*x[1, 1]) + (a*x[2, 1] + E[2, 1])*(E[1, 2] + (a + 2)*x[1, 2]) + (a*x[3, 1] + E[3, 1])*(E[1, 3] + (a + 2)*x[1, 3]), (a*x[1, 2] + E[1, 2])*(E[1, 1] + (a + 2)*x[1, 1]) + (a*x[2, 2] + E[2, 2])*(E[1, 2] + (a + 2)*x[1, 2]) + (a*x[3, 2] + E[3, 2])*(E[1, 3] + (a + 2)*x[1, 3]), (a*x[1, 3] + E[1, 3])*(E[1, 1] + (a + 2)*x[1, 1]) + (a*x[2, 3] + E[2, 3])*(E[1, 2] + (a + 2)*x[1, 2]) + (a*x[3, 3] + E[3, 3])*(E[1, 3] + (a + 2)*x[1, 3]), (a*x[1, 1] + E[1, 1])*(E[2, 1] + (a + 2)*x[2, 1]) + (a*x[2, 1] + E[2, 1])*(E[2, 2] + (a + 2)*x[2, 2]) + (a*x[3, 1] + E[3, 1])*(E[2, 3] + (a + 2)*x[2, 3]), (a*x[1, 2] + E[1, 2])*(E[2, 1] + (a + 2)*x[2, 1]) + (a*x[2, 2] + E[2, 2])*(E[2, 2] + (a + 2)*x[2, 2]) + (a*x[3, 2] + E[3, 2])*(E[2, 3] + (a + 2)*x[2, 3]), (a*x[1, 3] + E[1, 3])*(E[2, 1] + (a + 2)*x[2, 1]) + (a*x[2, 3] + E[2, 3])*(E[2, 2] + (a + 2)*x[2, 2]) + (a*x[3, 3] + E[3, 3])*(E[2, 3] + (a + 2)*x[2, 3]), (a*x[1, 1] + E[1, 1])*(E[3, 1] + (a + 2)*x[3, 1]) + (a*x[2, 1] + E[2, 1])*(E[3, 2] + (a + 2)*x[3, 2]) + (a*x[3, 1] + E[3, 1])*(E[3, 3] + (a + 2)*x[3, 3]), (a*x[1, 2] + E[1, 2])*(E[3, 1] + (a + 2)*x[3, 1]) + (a*x[2, 2] + E[2, 2])*(E[3, 2] + (a + 2)*x[3, 2]) + (a*x[3, 2] + E[3, 2])*(E[3, 3] + (a + 2)*x[3, 3]), (a*x[1, 3] + E[1, 3])*(E[3, 1] + (a + 2)*x[3, 1]) + (a*x[2, 3] + E[2, 3])*(E[3, 2] + (a + 2)*x[3, 2]) + (a*x[3, 3] + E[3, 3])*(E[3, 3] + (a + 2)*x[3, 3])];
select(t->op(0,t)=E,indets(A,indexed));
n:=max(map(t->op(1,t), %));
S1:={seq(a*x[k, k]+E[k, k],k=1..n)};
S2:={seq(E[k, k]+(a+2)*x[k,k],k=1..n)};
subsindets(A, Or(seq([identical~(S1),identical~(S2)][], k=1..n)), t->`if`(t in S1,op(1,t)+1,-1+op(2,t)));

 

@MDD 

restart;
A:=[(a*x[1, 1] + E[1, 1])*(E[1, 1] + (a + 2)*x[1, 1]) + (a*x[2, 1] + E[2, 1])*(E[1, 2] + (a + 2)*x[1, 2]) + (a*x[3, 1] + E[3, 1])*(E[1, 3] + (a + 2)*x[1, 3]), (a*x[1, 2] + E[1, 2])*(E[1, 1] + (a + 2)*x[1, 1]) + (a*x[2, 2] + E[2, 2])*(E[1, 2] + (a + 2)*x[1, 2]) + (a*x[3, 2] + E[3, 2])*(E[1, 3] + (a + 2)*x[1, 3]), (a*x[1, 3] + E[1, 3])*(E[1, 1] + (a + 2)*x[1, 1]) + (a*x[2, 3] + E[2, 3])*(E[1, 2] + (a + 2)*x[1, 2]) + (a*x[3, 3] + E[3, 3])*(E[1, 3] + (a + 2)*x[1, 3]), (a*x[1, 1] + E[1, 1])*(E[2, 1] + (a + 2)*x[2, 1]) + (a*x[2, 1] + E[2, 1])*(E[2, 2] + (a + 2)*x[2, 2]) + (a*x[3, 1] + E[3, 1])*(E[2, 3] + (a + 2)*x[2, 3]), (a*x[1, 2] + E[1, 2])*(E[2, 1] + (a + 2)*x[2, 1]) + (a*x[2, 2] + E[2, 2])*(E[2, 2] + (a + 2)*x[2, 2]) + (a*x[3, 2] + E[3, 2])*(E[2, 3] + (a + 2)*x[2, 3]), (a*x[1, 3] + E[1, 3])*(E[2, 1] + (a + 2)*x[2, 1]) + (a*x[2, 3] + E[2, 3])*(E[2, 2] + (a + 2)*x[2, 2]) + (a*x[3, 3] + E[3, 3])*(E[2, 3] + (a + 2)*x[2, 3]), (a*x[1, 1] + E[1, 1])*(E[3, 1] + (a + 2)*x[3, 1]) + (a*x[2, 1] + E[2, 1])*(E[3, 2] + (a + 2)*x[3, 2]) + (a*x[3, 1] + E[3, 1])*(E[3, 3] + (a + 2)*x[3, 3]), (a*x[1, 2] + E[1, 2])*(E[3, 1] + (a + 2)*x[3, 1]) + (a*x[2, 2] + E[2, 2])*(E[3, 2] + (a + 2)*x[3, 2]) + (a*x[3, 2] + E[3, 2])*(E[3, 3] + (a + 2)*x[3, 3]), (a*x[1, 3] + E[1, 3])*(E[3, 1] + (a + 2)*x[3, 1]) + (a*x[2, 3] + E[2, 3])*(E[3, 2] + (a + 2)*x[3, 2]) + (a*x[3, 3] + E[3, 3])*(E[3, 3] + (a + 2)*x[3, 3])];

S1:={seq(a*x[k, k]+E[k, k], k=1..3)};
S2:={seq(E[k, k]+(a+2)*x[k,k], k=1..3)};

subsindets(A, Or(seq(identical~(S1), k=1..3),seq(identical~(S2), k=1..3)), t->`if`(t in S1,op(1,t)+1,-1+op(2,t)));

 

@binbagsss  Yes of course. More accurately  D(V) (h(x)) = (dV/dh)(h(x))

 

@achreftabet  I do not know that. Maybe someone here specializing in differential equations can answer your question.

@JAMET The procedure  Ellipse  numerically solves the problem (it is convenient for plotting, etc.). If you want an explicit solution for symbolic parameters  a, b, phi  then the code below does it:

restart;
Vdot := proc(U, V) add(U[i]*V[i], i = 1 .. 2) end proc:
dist := proc(M, N) sqrt(Vdot(M-N, M-N)) end proc: 
c := sqrt(a^2-b^2):
F1 := [c, 0]: F2 := [-c, 0]:
M := [a*cos(t), b*sin(t)]:
MF2 := dist(M, F2):
MF1 := dist(M, F1):
varphi := arccos((MF1^2+MF2^2-4*c^2)/(2*MF1*MF2)):
Sol:=[solve(varphi=phi, t)] assuming a>0,b>0,a^2-b^2>0,phi>0:
t0:=simplify(arctan(op(1,Sol[5])/op(2,Sol[5]))) assuming a^2-b^2>0,sin(phi)>0;  # Value t for point M
simplify(eval(M,t=t0)) assuming a^2-b^2>0,sin(phi)>0,a^2*cos(phi)+a^2-2*b^2>0; # Coordinates of point M
simplify(eval(MF2,t=t0)) assuming a^2-b^2>0,sin(phi)>0,a^2*cos(phi)+a^2-2*b^2>0; # Distance from point M to focus F2 
simplify(eval(MF1,t=t0)) assuming a^2-b^2>0,sin(phi)>0,a^2*cos(phi)+a^2-2*b^2>0; # Distance from point M to focus F1

               

 

 

@JAMET  Look carefully at the example in my answer. The procedure returns the coordinates the point  M  as a list, as well as the distances of the point  M  from the focuses  F1  and  F2  MF1  and  MF2 )  for the specific parameters  a , b , phi .

First 14 15 16 17 18 19 20 Last Page 16 of 132