Kitonum

21860 Reputation

26 Badges

17 years, 239 days

MaplePrimes Activity


These are replies submitted by Kitonum

@vv  Formally, you are right. Because the velocity of motion in this model is equal to the gradient, we obtain a solution that is formally equal to  (0,0)  only for  t=infinity. But for  t=10  we get  (x,y) = (10*exp(-40),10*exp(-20)) = (4.248354255*10^(-17), 2.061153622*10^(-8)) , so that you are already at the top.

It is easy to write equations where the speed is constant, but this complicates the model.

@Muhammad Usman

I did not understand the meaning of this
                                     

 

@digerdiga  Do you want this output?

ex:=exp(-x^2/2*epsilon)*%sqrt((sqrt(x)/2/h)^2);
                                            

 

@MarcoFerro 

restart;
evalindets(x^2*y^3+alpha*x*y^5, `*`, p->lcoeff(p, [x,y])*m[degree(p,x),degree(p,y)]);

                                                      alpha*m[1, 5]+m[2, 3]

@MarcoFerro 

Example:

restart;
evalindets(x^2*y^3+x*y^5, `*`, p->m[degree(p,x),degree(p,y)]);

@das1404  Of course I was wrong. There is no second error in your code. However, in principle this statement  "Strings can not act as names" is true, for example:

"x" := 2;
    Error, invalid left hand side of assignment
 

@adxters  This procedure allows us to sort the sublists of some list by increasing the first element in the sublists. See an example:

L:=[[2,1], [1,3], [0,2]]:
sort(L, (a,b)->a[1]<=b[1]);
                                                   
 [[0, 2], [1, 3], [2, 1]]

@abhilashun  You can easily calculate the volume of this body numerically, using the Monte Carlo method (of course with low accuracy):

f1:=x^4+2*x^2*y^2+2*x^2*z^2+y^4+2*y^2*z^2+z^4-2*x^3-2*x*y^2-2*x*z^2-(79/25)*x^2-(104/25)*y^2-(8/5)*z^2+(104/25)*x:
f2:=x^4+2*x^2*y^2+2*x^2*z^2+y^4+2*y^2*z^2+z^4-2*x^2*y-2*y^3-2*y*z^2-(104/25)*x^2-(79/25)*y^2-(8/5)*z^2+(104/25)*y:
f3:=x^4+2*x^2*y^2+2*x^2*z^2+y^4+2*y^2*z^2+z^4+2*x^3+2*x*y^2+2*x*z^2-(79/25)*x^2-(104/25)*y^2-(8/5)*z^2-(104/25)*x:
f4:=x^4+2*x^2*y^2+2*x^2*z^2+y^4+2*y^2*z^2+z^4+2*x^2*y+2*y^3+2*y*z^2-(104/25)*x^2-(79/25)*y^2-(8/5)*z^2-(104/25)*y:
evalf(Int(`if`(f1<=0 and f2<=0 and f3<=0 and f4<=0, 1, 0), [x=-2..2, y=-2..2, z=-2..2], method = _MonteCarlo, epsilon=0.001));
                                                           
 12.16037145
 

@abhilashun

plots:-implicitplot3d(max(f1,f2,f3,f4)=0,  x=-2..2, y=-2..2,z=-2..2, style=surface, axes=normal, scaling=constrained, lightmodel=light3, numpoints=1000000); 

                                     

 

@Deank1905  You should more clearly formulate your problem and also download (or give a link) the worksheet.

@acer  I think your approach will be too difficult for a beginner. Because we already know that  f(1)=0 , then we can just write

f := x -> 2*x^2-2;
1/D(f)(1);
                                                


or if we do not know the value of  x  in  y=f(x)  for  y=0 :

f := x -> 2*x^2-2;
x:=eval(x, solve({f(x)=0, x>=0})) ;
1/D(f)(x);
                                                  

@amrramadaneg Try the following way. We have about 100 points  on every side of the square:

a:=2: b:=5:
plot([[0,t,t=-a..a], [t,a,t=0..b], [b,t,t=-a..a], [t,-a,t=0..b]], style=point, color=red,scaling=constrained, symbol=circle, symbolsize=3, numpoints=100, adaptive=false, size=[1000,600]);

@RElax  Sorry that did not answer your questions right away, I was pretty busy. I answer for each item. I note at once that this is not a recursive procedure, because In the body of the procedure, we do not refer anywhere to the name of the procedure.

1. In the first line we declare the name of the procedure, i.e. Sierpinski, and in parentheses after that we declare the names of formal parameters and their types.
2. In the next line, we declare the names of local variables. Outside the body of the procedure these are just symbols.
3. The sub-procedure  named  Step  plays a key role in Sierpinski procedure. It reproducts triangles for one step, i.e. to each element from a list  L (the element is a list of vertices of a triangle), it associates three new triangles. For example, triangles AEG, EBF, GFC, where E, F, G are the midpoints of the sides AB, BC, AC, will be associated with the triangle ABC.
4. In  A  we simply fill the interior of the resulting triangles, and in  B  we draw their vertices in the form of small circles.
5. display command depicts everything together.

@RElax  

1. I did not understand what you mean "...starting from "16" ".

2. Circles at the tops of the Sierpinski triangle:

Sierpinski1:=proc(T::list,n::nonnegint,C::symbol:=red)
local Step, A, B;
uses plottools, plots;
Step:=L->map(t->op([[t[1],(t[1]+t[2])/2,(t[1]+t[3])/2],[(t[1]+t[2])/2,t[2],(t[2]+t[3])/2],[(t[1]+t[3])/2,(t[2]+t[3])/2,t[3]]]), L);
A:=map(t->polygon(t,style=surface,color=C),(Step@@n)([T]));
B:=map(t->plot(t,style=point,color=C, symbol=circle, symbolsize=8),(Step@@n)([T]));
display(A,B, axes=none, scaling=constrained, size=[600,600]);
end proc:


Example of use:

Sierpinski1([[-1,0],[0,1.73],[1,0]], 5);

Output:

                        

@mehdi jafari  Here is another way in which the substitution  S  is done separately in the numerator and in the denominator:

restart;
f2:=-2*(sqrt(6*beta[11]^2-8*beta[11]*sigma[11]+12*beta[12]^2-24*beta[12]*sigma[12]+4*sigma[11]^2+12*sigma[12]^2)*(-sigma[11]^2-3*sigma[12]^2-3/2*(beta[11]^2)+2*beta[11]*sigma[11]+6*beta[12]*sigma[12]-3*beta[12]^2)+E*delta_gamma*omega*(beta[11]^2+6*beta[12]^2-12*beta[12]*sigma[12]+6*sigma[12]^2))*(1/sqrt(6*beta[11]^2-8*beta[11]*sigma[11]+12*beta[12]^2-24*beta[12]*sigma[12]+4*sigma[11]^2+12*sigma[12]^2))*(1/(3*beta[11]^2-4*beta[11]*sigma[11]+6*beta[12]^2-12*beta[12]*sigma[12]+2*sigma[11]^2+6*sigma[12]^2));
S:=sqrt(6*beta[11]^2-8*beta[11]*sigma[11]+12*beta[12]^2-24*beta[12]*sigma[12]+4*sigma[11]^2+12*sigma[12]^2)=phi:
simplify(subs(S,numer(f2))/subs(S,denom(f2)));

 

First 47 48 49 50 51 52 53 Last Page 49 of 134