Kitonum

13367 Reputation

24 Badges

11 years, 72 days

MaplePrimes Activity


These are answers submitted by Kitonum

plots:-implicitplot3d(`if`(y<x and z<y,cos(x-y)*cos(y-z)*cos(x-2*z)^3-0.6, NULL), x=0..5, y=0..5, z=0..2, style=surface, color=green, numpoints=500000, axes=normal);

 

remove~(is, S);

# Or (for old versions of Maple)

map(t->remove(is, t), S);
 

f1 := [12.5, 16, 20, 25, 31.5, 40, 50, 63, 80, 100, 125, 160, 200, 250, 315, 400, 500, 630, 800, 1000, 1250, 1600, 2000, 2500, 3150, 4000, 5000, 6300, 8000, 10000, 12500, 16000, 20000]:
x:= 23:
y:= 36:
Lp:= t->8-10*log[10]((1+(t/(2*x))^2.5)*(1+(y/(2.*t))^1.7));
[seq(Lp(t), t=f1)];

or use element-wise operator ~:

f1 := [12.5, 16, 20, 25, 31.5, 40, 50, 63, 80, 100, 125, 160, 200, 250, 315, 400, 500, 630, 800, 1000, 1250, 1600, 2000, 2500, 3150, 4000, 5000, 6300, 8000, 10000, 12500, 16000, 20000]:
x:= 23:
y:= 36:
Lp:= t->8-10*log[10]((1+(t/(2*x))^2.5)*(1+(y/(2.*t))^1.7));
Lp~(f1);

Obviously the last is the shortest way.

Edit.

Here is another way that will also work in older versions of Maple, which do not have the output = permutation option.

Two examples:

# Example 1 - sort rows in descending order of elements of the 3rd column
A:=LinearAlgebra:-RandomMatrix(4, generator = -10 .. 10);
sort(convert(A, listlist), (x,y)->x[3]>=y[3]);
Matrix(%);

# Example 2 - how many elements in the 3rd column are 5? 
`+`(seq(`if`(A[i,3]=5,1,0), i=1..4));

 


 

pde1 := k*(diff(u(x, t), x, x)) = diff(u(x, t), t)

k*(diff(diff(u(x, t), x), x)) = diff(u(x, t), t)

(1)

iv1 := u(0, t) = 0, u(L, t) = 0, u(x, 0) = 2;

u(0, t) = 0, u(L, t) = 0, u(x, 0) = 2

(2)

pdsolve([pde1, iv1], u(x, t))

u(x, t) = Sum(-4*(-1+(-1)^(_Z4*csgn(1/L)))*sin(Pi*_Z4*x/L)*exp(-k*Pi^2*_Z4^2*t/L^2)/(Pi*_Z4), _Z4 = 1 .. infinity)

(3)

lprint(%);

u(x, t) = Sum(-4*(-1+(-1)^(_Z4*csgn(1/L)))*sin(Pi*_Z4*x/L)*exp(-k*Pi^2*_Z4^2*t/L^2)/(Pi*_Z4), _Z4 = 1 .. infinity)

 

subs(_Z4 = n, %);

u(x, t) = Sum(-4*(-1+(-1)^(n*csgn(1/L)))*sin(Pi*n*x/L)*exp(-k*Pi^2*n^2*t/L^2)/(Pi*n), n = 1 .. infinity)

(4)

 

 


 

Download evaluate_a_sum_new.mw

printlevel := 2; M1 := 3; M2 := 3; nu := 1;
for k1 from 0 while k1 <= M1-1 do
for k2 from 0 while k2 <= M2-1 do
GP[k1+1, k2+1] := simplify(sum((-1)^(k1-i1)*GAMMA(k1+i1+2*nu)*GAMMA(nu+1/2)*x^i1*(sum((-1)^(k2-i2)*GAMMA(k2+i2+2*nu)*GAMMA(nu+1/2)*y^i2/(GAMMA(i2+nu+1/2)*factorial(k2-i2)*factorial(i2)*GAMMA(2*nu)), i2 = 0 .. k2))/(GAMMA(i1+nu+1/2)*factorial(k1-i1)*factorial(i1)*GAMMA(2*nu)), i1 = 0 .. k1));
end do; end do;
<seq(seq(GP[i,j],j=1..M2), i=1..M1)>;
# if a is just a symbol then
<seq(seq(a[i,j],j=1..M2), i=1..M1)>;

 

But you calculate completely different integrals, so the results are different.

V = Int(N, T__2 = 0 .. infinity)<>IntegrationTools:-Parts(V, exp(sigma-delta*(T__2-T__F)-(T__2-T__F)^2/T__p^2), T__2)

Using the option  T__2  you change the source integral. See the help on the  IntegrationTools:-Parts  command.


Take a look at a simple example in which we see that adding a third parameter in the  IntegrationTools:-Parts  command completely changes the original integral:

V:=Int(x^2*sin(x), x);
IntegrationTools:-Parts(V,x^2);
IntegrationTools:-Parts(V,x^2,x);

                

 

 

Your surface is the part of the green surface above the blue plane:

f:=x^3*y*z;
plot3d([solve(f=0.5, z), y], x=0..y, y=0..3, color=[green,blue], view=0..3, axes=normal);

        

The lowest point of your surface has equal coordinates  0.5^(1/5)

As alternative you can also use the  simplify  command with side relations option:

eqn:= N*x*y - x*y + f(x,y) = 0;
simplify(eqn, {x*y= 1});

 

This can be done in many ways. Here is a solution using a procedure that I wrote many years ago. All comments in the procedure are written in Russian. The full text of the procedure itself can be found in the attached file, and here its application to your example:

   

L:=-185173378616457/6178315520000*x+86813215770519/24713262080000*(y^2)+126906272070543/24713262080000*(x^2)+256107247454961/6178315520000+(2514994832007/950510080000*x)*y-9123740375967/6178315520000*y = 0 :  
QuadricCurveAnalysis(L, detail);

`&Ucy;&rcy;&acy;&vcy;&ncy;&iecy;&ncy;&icy;&iecy; &zcy;&acy;&dcy;&acy;&ncy;&ncy;&ocy;&jcy; &kcy;&rcy;&icy;&vcy;&ocy;&jcy; &vcy; &kcy;&ocy;&ocy;&rcy;&dcy;&icy;&ncy;&acy;&tcy;&acy;&khcy; (x, y):`

 

-(185173378616457/6178315520000)*x+(86813215770519/24713262080000)*y^2+(126906272070543/24713262080000)*x^2+256107247454961/6178315520000+(2514994832007/950510080000)*x*y-(9123740375967/6178315520000)*y = 0

 

`&Scy;&ocy;&bcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ycy;&iecy; &vcy;&iecy;&kcy;&tcy;&ocy;&rcy;&ycy; &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&ucy;&yucy;&shchcy;&iecy;&jcy; &kcy;&vcy;&acy;&dcy;&rcy;&acy;&tcy;&icy;&chcy;&ncy;&ocy;&jcy; &fcy;&ocy;&rcy;&mcy;&ycy;:`

 

v[1] = (array( 1 .. 2, [( 1 ) = (84/137+(5/137)*1033^(1/2)), ( 2 ) = (1)  ] )), v[2] = (array( 1 .. 2, [( 1 ) = (84/137-(5/137)*1033^(1/2)), ( 2 ) = (1)  ] ))

 

`Соответствующие собственные числа:`

 

lambda[1] = 106859743920531/24713262080000+(18357626511/380204032000)*1033^(1/2), lambda[2] = 106859743920531/24713262080000-(18357626511/380204032000)*1033^(1/2)

 

`Тип кривой:  эллипс`

 

`Каноническое уравнение:`

 

`x' `^2/((1/64)*(5821+65*1033^(1/2))^(1/2))^`2`+`y' `^2/((1/64)*(5821-65*1033^(1/2))^(1/2))^`2` = 1

 

`Фокусное расстояние:`

 

c = (1/64)*130^(1/2)*1033^(1/4)

 

`Эксцентриситет эллипса:`

 

epsilon = 130^(1/2)*1033^(1/4)/(5821+65*1033^(1/2))^(1/2)

 

`Координаты фокусов в старой системе координат (x,y):`

 

F[1]((1/64)*(84-5*1033^(1/2))*130^(1/2)*1033^(1/4)/(51650-840*1033^(1/2))^(1/2)+203/64, (137/64)*130^(1/2)*1033^(1/4)/(51650-840*1033^(1/2))^(1/2)-63/64), F[2](-(1/64)*(84-5*1033^(1/2))*130^(1/2)*1033^(1/4)/(51650-840*1033^(1/2))^(1/2)+203/64, -(137/64)*130^(1/2)*1033^(1/4)/(51650-840*1033^(1/2))^(1/2)-63/64)

 

`Уравнения директрис в старой системе координат (x,y):`

 

-84*x/(51650-840*1033^(1/2))^(1/2)+5*1033^(1/2)*x/(51650-840*1033^(1/2))^(1/2)-137*y/(51650-840*1033^(1/2))^(1/2)+(8421/64)/(51650-840*1033^(1/2))^(1/2)-(1015/64)*1033^(1/2)/(51650-840*1033^(1/2))^(1/2)+(1/128)*130^(1/2)*1033^(1/4)+(5821/8594560)*130^(1/2)*1033^(3/4) = 0, -84*x/(51650-840*1033^(1/2))^(1/2)+5*1033^(1/2)*x/(51650-840*1033^(1/2))^(1/2)-137*y/(51650-840*1033^(1/2))^(1/2)+(8421/64)/(51650-840*1033^(1/2))^(1/2)-(1015/64)*1033^(1/2)/(51650-840*1033^(1/2))^(1/2)-(1/128)*130^(1/2)*1033^(1/4)-(5821/8594560)*130^(1/2)*1033^(3/4) = 0

 

`Уравнения большой и малой осей эллипса:`

 

-137*x/(51650-840*1033^(1/2))^(1/2)+84*y/(51650-840*1033^(1/2))^(1/2)-5*1033^(1/2)*y/(51650-840*1033^(1/2))^(1/2)+(33103/64)/(51650-840*1033^(1/2))^(1/2)-(315/64)*1033^(1/2)/(51650-840*1033^(1/2))^(1/2) = 0, 137*x/(51650+840*1033^(1/2))^(1/2)-84*y/(51650+840*1033^(1/2))^(1/2)-5*1033^(1/2)*y/(51650+840*1033^(1/2))^(1/2)-(33103/64)/(51650+840*1033^(1/2))^(1/2)-(315/64)*1033^(1/2)/(51650+840*1033^(1/2))^(1/2) = 0

 

`Связь старых и новых координат:`

 

x = -(84-5*1033^(1/2))*`x'`/(51650-840*1033^(1/2))^(1/2)+(84+5*1033^(1/2))*`y'`/(51650+840*1033^(1/2))^(1/2)+203/64

 

y = -137*`x'`/(51650-840*1033^(1/2))^(1/2)+137*`y'`/(51650+840*1033^(1/2))^(1/2)-63/64

 

`Угол поворота новой системы координат относительно старой:`

 

alpha = (1/2)*arctan(137/84)-(1/2)*Pi

 

`График кривой в системах координат (x,y) и (x',y'):`

 

 

 


 

Download QuadricCurveAnalysis.mw

This is a known bug in  RealDomain  package when it does not take into account the domain of the equation. Here is a simple workaround:

restart;
RealDomain:-solve({(x-1)*sqrt(x^2-4) = 0, x^2-4>=0}, x);

                                     {x = -2}, {x = 2}

restart;
f:=t->piecewise(t<1 and t>=-1,t/2+1/2,t>=1 and t<2,-t+2);
F:=t->f(t-floor((t+1)/3)*3); #  F  is a periodic extension of  f  to the whole real axis
F(4.5);
plot(F(t), t=-4..5, scaling=constrained, size=[1200,150]);

Use the  LinearAlgebra:-GenerateMatrix  command for this (3 steps):
 

Download MatrixForm.mw

If you do not like the order of the elements in the set, then you can convert it into the list, and then sort this list according to the desired order:

E:={{1,2,3,4,5,6},{4,5,6,7,8,9,10,11},{10,11,12,13,14}};
        E := {{10, 11, 12, 13, 14}, {1, 2, 3, 4, 5, 6}, {4, 5, 6, 7, 8, 9, 10, 11}}
E1:=convert(E, list);
       E1 := [{10, 11, 12, 13, 14}, {1, 2, 3, 4, 5, 6}, {4, 5, 6, 7, 8, 9, 10, 11}]
sort(E1, (x,y)->x[1]<y[1]);
       [{1, 2, 3, 4, 5, 6}, {4, 5, 6, 7, 8, 9, 10, 11}, {10, 11, 12, 13, 14}]


Of course, to avoid this hassle, you should immediately specify E as a list and not as a set.

See help on the  diff  command.

The code for your example:

w:=exp(-beta*t-mu*x)*u(x,t);
diff(w, t);

 

3 4 5 6 7 8 9 Last Page 5 of 209