vv

12153 Reputation

19 Badges

8 years, 3 days

MaplePrimes Activity


These are answers submitted by vv

restart;
f := (x1-x2)*(x2-x3)*(x3-x4)*(x4-x1): 
G := x1^2+x2^2+x3^2+x4^2-1:
H:=f + x5*G:
X:=x1,x2,x3,x4,x5:
Groebner:-Basis(diff~(H, [X]), plex(X)):
S:=solve(%, explicit):
nops([S]);      #    40
S[-1], simplify(eval(f, S[-1]));

{x1 = 1/4 + sqrt(3)/4, x2 = sqrt(3)/4 - 1/4, x3 = 1/4 - sqrt(3)/4, x4 = -1/4 - sqrt(3)/4, x5 = 1/4},   -1/8

DirectSearch works well, not very fast though. (The absolute minimum is -0.125).

restart;
f := (x1-x2)*(x2-x3)*(x3-x4)*(x4-x1): 
G := x1^2+x2^2+x3^2+x4^2-1:
with(DirectSearch):
GlobalOptima(f, [G=0,x1>=0]);

[-0.125000010409962, [x1 = 0.183013027400331, x2 = 0.683012548155197, x3 = -0.683012850582002, x4 = -0.183012508983874], 4041]

restart;
eq1 := c[2] = Z^2/(2*(m + 2)):
eq2 := Int((m*(c[2] - x^2/(2*(m + 2))))^(1/m), x = 0 .. Z) = alpha:
IntegrationTools:-Change(eval(eq2,eq1), x=t*Z,t):
combine(value(%)) assuming m>0,Z>0:
Zsol := combine(solve(%, Z, explicit)) assuming m>0;

(It can be expressed using powers, without ln and exp).

After a change of variables, the integral reduces to

F := int(sin(cos(t))*cos(t),t);

so, for a purely transcendental function.
AFAIK for such functions the Risch algorithm is completely implemented in Maple.
Maple does not compute F, so F is not elementary.
It remains of course the question whether F could be expressed using some special functions.

simplify should be enugh, but combine is necessary here.
simplify(combine(r)) assuming x<=0;     # 0

simplify(combine(r)) assuming x::real;  #  x + |x|

restart
#Digits:=15:
e:=1+0.1/(u^2+0.01*u+1):
n:=sqrt(e-1+n0^2):
Nd:=4*n0/n:
Ns:=n/n0:
Rd:=(Nd-1)/(Nd+1):
Rs:=(Ns-1)/(Ns+1):
#v:=-32/12*evalf(Int(Int(16*Pi^4*u^3*z^4*(exp(-4*Pi*u*n0*z*(Rd*(n0^2+1/2)-1/2*Rs))),n0=0..1),u=0..infinity)):
A:=-32/12*16*Pi^4*u^3*z^4*(exp(-4*Pi*u*n0*z*(Rd*(n0^2+1/2)-1/2*Rs))):
V:= Z ->  -32/12*evalf(Int(eval(A,z=Z),[n0=0..1,u=0..infinity], epsilon=1e-3)):
plot(V, 1..10, numpoints=10, adaptive=false);

implicitplot implements many algorithms and has many options.
E.g. adding the option signchange = false, the line (asymptote) disappears.

The (sub)groups are represented by generators, without generating all the elements.
Both S_10 and S_11 have two generators, see Generators(Symm(10)) and Generators(Symm(11))
so using simple algorithms it will be easy to compute the cosets.

g := (x, T) -> T*x + x^2:  #just an example
dgdx:=(x,T) -> D[1](g)(x,T);
dgdx(1, 2);
dgdx(x, 1);
g:='g';
dgdx(x, T);
convert(%,diff);


                dgdx := (x, T) -> D[1](g)(x, T)
                               4
                            1 + 2 x
                             g := g
                         D[1](g)(x, T)
                           d         
                          --- g(x, T)
                           dx        
 

It is obvious that the result of odetest cannot be 0, because sol is a truncated series.
(strictly speaking, it's not a `series`, the type being `+`).
But this works as expected:

restart;
Order:=20:
ode:=x^3*diff(y(x),x$2)+x^2*diff(y(x),x)+y(x)=0:
sol:=dsolve(ode,y(x),'series',x=infinity):
odetest(sol,ode):
asympt(%,x); # just simplifies

            

stats is obsolete; use Statistics

restart;

with(Statistics):

f := PDF( Normal(0, 2*4.47), x );

0.3155422726e-1*2^(1/2)*exp(-0.6255974455e-2*x^2)

(1)

plot(f, x=-20..20);

 

int(x*f, x);

-3.566543986*exp(-0.6255974455e-2*x^2)

(2)

int(x*f, x=0..5);

.5163728648

(3)

 

 

 

Download stat.mw

 

 

################################
# Solution "by hand"
# For simplicity, take a=0, b=1;
################################

restart;

de := diff(u(x),x$4) = Heaviside(x - a)*u(x) - Heaviside(x - b)*u(x);

diff(diff(diff(diff(u(x), x), x), x), x) = Heaviside(x-a)*u(x)-Heaviside(x-b)*u(x)

(1)

a:=0;b:=1;

0

 

1

(2)

dsolve(de, parametric); # wrong

u(x) = piecewise(x < 0, (1/6)*_C1*x^3+(1/2)*_C2*x^2+_C3*x+_C4, x < 1, _C1*exp(-x)+_C2*exp(x)+_C3*sin(x)+_C4*cos(x), 1 <= x, (1/6)*_C1*x^3+(1/2)*_C2*x^2+_C3*x+_C4)

(3)

de1:=eval(de) assuming x<0;
de2:=eval(de) assuming 0<x,x<1;
de3:=eval(de) assuming 1<x;

diff(diff(diff(diff(u(x), x), x), x), x) = 0

 

diff(diff(diff(diff(u(x), x), x), x), x) = u(x)

 

diff(diff(diff(diff(u(x), x), x), x), x) = 0

(4)

s1:=rhs(dsolve(de1)):
s2:=rhs(dsolve(de2)):
s3:=rhs(dsolve(de3)):

S:=piecewise(x<0, eval(s1,[_C1=c1,_C2=c2,_C3=c3,_C4=c4]), x<1, eval(s2,[_C1=c5,_C2=c6,_C3=c7,_C4=c8]), eval(s3,[_C1=c9,_C2=c10,_C3=c11,_C4=c12]));

S := piecewise(x < 0, (1/6)*c1*x^3+(1/2)*c2*x^2+c3*x+c4, x < 1, c5*exp(-x)+c6*exp(x)+c7*sin(x)+c8*cos(x), (1/6)*c9*x^3+(1/2)*c10*x^2+c11*x+c12)

(5)

seq(seq(limit(diff(S,[x$k]), x=p,left) - limit(diff(S,[x$k]), x=p,right), k=0..3), p=[a,b]):

solve([%]):

SOL:=simplify(eval(S, %));

SOL := piecewise(x < 0, (1/6)*(-c5+c6-c7)*x^3+(1/6)*(3*c5+3*c6-3*c8)*x^2+(1/6)*(-6*c5+6*c6+6*c7)*x+c5+c6+c8, x < 1, c5*exp(-x)+c6*exp(x)+c7*sin(x)+c8*cos(x), 1 <= x, (1/6)*(-x^3*c7+(3*c7-3*c8)*x^2+(3*c7+6*c8)*x-5*c7+3*c8)*cos(1)+(1/6)*(c8*x^3+(-3*c7-3*c8)*x^2+(6*c7-3*c8)*x+3*c7+5*c8)*sin(1)-(1/6)*c5*(x^3-6*x^2+15*x-16)*exp(-1)+(1/6)*c6*exp(1)*(x^3+3*x+2))

(6)

indets(SOL, name);

{c5, c6, c7, c8, x}

(7)

plot(eval(SOL,[c5=5,c6=6,c7=7,c8=8]), x=-1..2);

 

 


Download byhand-ode.mw

{indices}(table(AA),'pairs');

 

Your equation is polynomial of degree 5 in the unknown R, with huge symbolic coefficients.
Such equations usually do not have explicit solutions (see Abel–Ruffini theorem theorem and Galois theory). 

The worksheet is corrupted, or contains some hidden fields.
If the .mw is exported as .mpl and then opened in a fresh session, it runs OK.

 

4 5 6 7 8 9 10 Last Page 6 of 110