## 12605 Reputation

8 years, 249 days

## combine...

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)):
```

## options...

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

## Generators...

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.

## D...

```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

## asympt...

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
```

## Statistics...

stats is obsolete; use Statistics

 > restart;
 > with(Statistics):
 > f := PDF( Normal(0, 2*4.47), x );
 (1)
 > plot(f, x=-20..20);
 > int(x*f, x);
 (2)
 > int(x*f, x=0..5);
 (3)
 >
 >

## The new ode...

 >
 > ################################ # 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);
 (1)
 > a:=0;b:=1;
 (2)
 > dsolve(de, parametric); # wrong
 (3)
 > de1:=eval(de) assuming x<0; de2:=eval(de) assuming 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]));
 (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, %));
 (6)
 > indets(SOL, name);
 (7)
 > plot(eval(SOL,[c5=5,c6=6,c7=7,c8=8]), x=-1..2);
 >

## A way...

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

## degree 5...

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

## Corrupted worksheet...

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.

## maybe...

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.

## Digits...

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

## evalf...

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:=:
 > A:=;
 (1)
 > LinearAlgebra:-Rank(A);        # exact
 (2)
 > LinearAlgebra:-Rank(evalf(A)); # "approx" but probably "expected"
 (3)

## Just replace in param1,...,param4: ...

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