Kitonum

21445 Reputation

26 Badges

17 years, 46 days

MaplePrimes Activity


These are answers submitted by Kitonum

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);

 

Eq:=v1(t) - R1*(-i3(t)/n13 - i2(t)/n12) - L1*diff(-i3(t)/n13 - i2(t)/n12, t) = n12*(v2(t) - R2*i2(t) - L2*diff(i2(t), t));
Eq1:=expand((lhs-rhs)(Eq));
Terms:=[op(Eq1)];
DTerms:=select(has, Terms, diff);
Lhs:=add(DTerms);
collect(Lhs, diff)=collect(-(Eq1-Lhs), R1);  # The final result

 

You must specify the integration range, but you cannot use the symbol to as a name because it is a reserved word. I replaced it with  a :

a:=3:
evalf(int(exp((5+I*6)*x)*sin(1+erf(x)),x=-a..a));
evalf(int(exp((5+I*6)*x)*cos(1+erf(x)),x=-a..a));

 

restart;
eqn1 := e1*i1 + e2*i2 + e3*i3 = 0;
A:=i1=expand(solve(eqn1, i1));
subs(e2=e1/n12, A);


Or more automatically:

restart;
eqn1 := e1*i1 + e2*i2 + e3*i3 = 0;
A:=i1=expand(solve(eqn1, i1));
eqn2 := n12 = e1/e2;
subs(e2=solve(eqn2, e2), A);


Or using the  applyop  command:

restart;
eqn1 := e1*i1 + e2*i2 + e3*i3 = 0;
A:=i1=expand(solve(eqn1, i1));
applyop(simplify, [2,1], A, {e1/e2=n12});


Edit.
 

Use  plots:-pointplot3d  and  plots:-display  commands for this.

An example:

pointplot3d.mw

You forgot to specify values for  xbas, tbas :


 

restart;
a:=-2:
b:=2:
alpha:=0.1:
beta:=1:
xbas:=2: tbas:=1:
pde:=diff(uu(x,t),t)=alpha*diff(uu(x,t),x,x)+beta*uu(x,t)*(1-uu(x,t));
IC:=uu(x,0)=(sech(10*x))^2;
BC:=uu(a,t)=0,uu(b,t)=0;  

s:=pdsolve(pde,{IC,BC},numeric ,timestep=1/100, spacestep=1/100);
s :- animate( uu(x,t) ,t=0..tbas, frames=40, labels=["x", "u(x,t)"], labelfont=[TIMES,ROMAN,14]);
plots:-animate(s:-plot3d,[uu(x,t), x=-xbas..xbas,t=0..aa, shading=zhue, axes=boxed, labels=["x","t","u(x,t)"], labelfont=[TIMES,ROMAN,16]], aa=0.005..tbas, frames=90);

diff(uu(x, t), t) = .1*(diff(diff(uu(x, t), x), x))+uu(x, t)*(1-uu(x, t))

 

uu(x, 0) = sech(10*x)^2

 

uu(-2, t) = 0, uu(2, t) = 0

 

_m2169187629056

 

 

 

 


 

Download anim_plot3d.mw
 

 

I rewrote your code as 2 procedures. The first one generates a full random polynomial of degree  N  with coefficients from the range  . The second finds all rational roots of a polynomial with integer coefficients:


 

FullRandomPolynom := proc (N::posint, R) local q; do q := randpoly(x, coeffs = rand(R), degree = N, dense); if nops(q) = N+1 then break end if; q end do end proc

FindingRationalRoots := proc (q::polynom) local S1, S2, s1, s2, x0, x1, k, RationalRoots; S1 := NumberTheory[Divisors](lcoeff(q, x)); S2 := NumberTheory[Divisors](tcoeff(q, x)); RationalRoots := table(); k := 0; for s1 in S1 do for s2 in S2 do x0 := s2/s1; x1 := -s2/s1; if eval(q, x = x0) = 0 then k := k+1; RationalRoots[k] := x0 end if; if eval(q, x = x1) = 0 then k := k+1; RationalRoots[k] := x1 end if end do end do; convert(RationalRoots, set) end proc

``

q := FullRandomPolynom(3, -9 .. 9); FindingRationalRoots(q)

{}

(1)

q := expand((x-1)*(x-2)*(x^2-9)); FindingRationalRoots(q)

{-3, 1, 2, 3}

(2)

 

NULL


 

Download rational_zeros_new.mw

First 84 85 86 87 88 89 90 Last Page 86 of 289