vv

12605 Reputation

19 Badges

8 years, 249 days

MaplePrimes Activity


These are answers submitted by vv

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.

 

The documentation of SubgroupLattice says:

The algorithm used does not find any perfect subgroups of G, other than potentially G itself, its soluble residual, and the trivial group. If the soluble residual of G is of size at least 360, then it may contain other nontrivial perfect subgroups. These will not be found by the algorithm.

Maybe there are other omissions.
 

The denominator has many very small values ==> large roundoff errors.
Increasing Digits (e.g. Digits:=15) solves the problem.

If the matrix A has both exact and float entries, then it is obvious that some computations (e.g. the value of a discontinuous function) may return "unexpected" results.
Rank is such a discontinuous function. You have to accept this fact.
E.g. if A has two columns such that the first one is symbolic with at least an irrational entry,
and the second column is nonzero with float entries, the rank(A) is always 2.

restart;

v:=<sqrt(3), 2, 0>:

A:=<v|evalf[25](v)>;

Matrix(3, 2, {(1, 1) = sqrt(3), (1, 2) = 1.732050807568877293527446, (2, 1) = 2, (2, 2) = 2., (3, 1) = 0, (3, 2) = 0.})

(1)

LinearAlgebra:-Rank(A);        # exact

2

(2)

LinearAlgebra:-Rank(evalf(A)); # "approx" but probably "expected"

1

(3)

 

Just replace in param1,...,param4:  alpha*gamma=0.004;   with   gamma=0.004/alpha;
(or use algsubs).

Advices:
- don't load packages which are not needed
- gamma is a Maple constant, don't use it as a variable
- linalg is deprecated; use LinearAlgebra instead.

 

First 7 8 9 10 11 12 13 Last Page 9 of 112