Kitonum

21445 Reputation

26 Badges

17 years, 41 days

MaplePrimes Activity


These are answers submitted by Kitonum

a := n->(1/2)*(1/n-(-1)^n/n-1/n^2-(-1)^n/n^2);

 

Examples of use:

a(3), a(4), a(11), a(14), a(100);

                                             1/3, -1/16, 1/11, -1/196, -1/10000

1. A system better at once to write in curly (or square) brackets.

2. If you still want to insert a label (instead of a name) then first use  Ctrl+L (the same you can do from  Insert  menu).

 

 

 

To prevent the automatic change of the argument in the sin, you can use the empty symbol `` .  If any substitutions and other transformations, the expression inside  the extra parentheses retained. To remove these extra parentheses expand command should be applied to the argument:

b:=sin(``(x+y+z-Phi));

c:=eval(%, x=1);

applyop(t->t/2, 1, c);

applyop(expand, 1, c);

                                 

 

 

 

First we plot this body:

plots[implicitplot3d](sqrt(x^2+y^2)=5*sin(z)*exp(-(Pi-z)/(1.5)),x=-2.3..2.3,y=-2.3..2.3, z=0..3.7, style=surface, numpoints=1000000,color=khaki, axes=normal, scaling=constrained);

                               

 

Below the problem is reduced to the calculation of the surface integral over this surface (assuming the surface density equal to 1). Unfortunately Maple cannot symbolically compute the double integral (calculated only one of two successive integrals). The remaining integral is computed numerically:

f:=unapply(5*sin(z)*exp(-2*(Pi-z)/3), z):

F:=unapply(sqrt(f(z)^2-x^2), x,z);

MI_z:=4*int(sqrt(1+diff(F(x,z),x)^2+diff(F(x,z),z)^2)*f(z)^2,[x=0..f(z),z=0..Pi]);

 

evalf(MI_z);

evalf[20](MI_z);

                         

 

So the final result   105.1187800

toandhsp, you wrote "How can I add this code into Perpendicularity Criterion?"  You can write your own code (to simplify the equation of the line a*x+b*y+c=0) in the form of a  procedure, and then use this procedure when you want. 

P:=proc(d::equation)

local a, b, k;

a := coeff(lhs(d), x):

b := coeff(lhs(d), y):

k := igcd(a, b):

if a <> 0 then sign(a)*sort(d)/k else sign(b)*sort(d)/k fi;

end proc:

 

Examples of use:

P(-6*x+2*y+8 = 0);

map(t->[P(t[1]),P(t[2]),t[3]], [[-4*x-3*y-44 = 0, -4*x+3*y-14 = 0, [x = -29/4, y = -5]], [-4*x-3*y-44 = 0, -3*x-4*y-48 = 0, [x = -32/7, y = -60/7]], [-4*x-3*y-44 = 0, 3*x+4*y-2 = 0, [x = -26, y = 20]]]);

                                                                    3 x - y - 4 = 0

[[4*x+3*y+44 = 0, 4*x-3*y+14 = 0, [x = -29/4, y = -5]], [4*x+3*y+44 = 0, 3*x+4*y+48 = 0, [x = -32/7, y = -60/7]], [4*x+3*y+44 = 0, 3*x+4*y-2 = 0, [x = -26, y = 20]]]

psi:=u(x,y,t)+I*v(x,y,t):

evalc(diff(psi,t)*I+diff(psi,x,x)=epsilon*diff(evalc(abs(psi)^2),y,y)*psi);

evalc~([(Re,Im)~(%)]);  # This is your desired system

 

 

Edited.

 

 

 

You can display it as follows:

aa1:=``(f(x+Dx,y+Dy)-f(x,y+Dy)) - ``(f(x,y)-f(x,y+Dy));

                  

 

 

Obviously that in real domain the system of three equations  {pd1=0, pd2=0, pd3=0}  is equivalent to the single equation  pd1^2+ pd2^2+ pd3^2=0

restart;

AllGraphs:=proc(n::posint)

local V, S;

uses combinat, GraphTheory;

V:={$1..n};

choose(V,2);

S:=powerset(%);

[seq(Graph(n,s), s=S)];

end proc:

 

Examples of use:

AllGraphs(3);

plots[display](Matrix(2,4, GraphTheory[DrawGraph]~(%)));

 

or

AllGraphs(4);

plots[display](Matrix(8,8, GraphTheory[DrawGraph]~(%)));

 

F:=(d^4-2)*C+(7*d^3-3*d)*C^2-(10*d^4-4*d)*L^2+(d-d^2)*L^3+(R+z^2)*x1+(10*d^3-4*d)*L:

F:=coeff(F,C)*C+coeff(F,L)*L+coeff(F,x1)*x1;

                                          F := (d^4-2)*C+(10*d^3-4*d)*L+(z^2+R)*x1

or more automatically

restart;

F:=(d^4-2)*C+(7*d^3-3*d)*C^2-(10*d^4-4*d)*L^2+(d-d^2)*L^3+(R+z^2)*x1+(10*d^3-4*d)*L:

V:=<C,L,x1>:

F:=add(coeff(F,v)*v, v=V);

Because the function has circular symmetry, it is natural to immediately use the polar coordinates:

int(int(Heaviside(1-r^2)*r, r=0..1), phi=0..2*Pi);

                                      Pi

 

This calculation can be easily done by hand (without Maple).

 

Student[Basics][ExpandSteps](factor(x^4+4));

 

 

You have to read from the bottom up.

display(fig1, plot(eval(Model, MinSol[2]), x = 0 .. 1.5, color = red, thickness = 0));

                                  

 

 

 

 

You can generate a random function of a certain class of functions depending on a finite number of parameters.

Example: a random function of the class  a*sin(b*x+c)  in which  [a,b,c]  is a random list of floats with the uniform distribution in the range  0..10 :

RandomTools[Generate](list(float(range=0...10, method=uniform), 3));

eval(a*sin(b*x+c), [a,b,c]=~%);

                            

 

 

 

Should be  D(x)(0)  instead of  D(x) (0)

A space between  D(x)  and  (0)  Maple interprets as a multiplication.

First 181 182 183 184 185 186 187 Last Page 183 of 289