Christian Wolinski

MaplePrimes Activity


These are answers submitted by Christian Wolinski

A := {1, 2, 3, 4, 6, 8, 12, 17, 19, 20};
select(is, A , RealRange(5, 15));
select(proc(x, y, z) x>=y and z>=x end, A, 5, 15);

 

A := x*y/(y-x*sqrt(y)-x^2);
(simplify@@2)(A, [y = sq^2]) assuming sq>0;
A_PS := convert(%, FormalPowerSeries, x);
B := op(1, A_PS);
simplify(B) assuming sq>0, k, nonnegint;
subs(sq=sqrt(y), %);
collect(add(%, subsop([2,2]=8, op(2, A_PS))), x, radnormal)
;

assign('Q = Q, R = R');
collect(collect(A, epsilon, Q), Q, proc(x) if type(x, identical(epsilon)^anything) then R(epsilon, op(2, x)) elif type(x, identical(epsilon)) then R(epsilon, 1) else x fi end);
seq(eval(P = coeff(%, P), [Q = (x -> x), R = ((x, y) -> x^y)]), P = sort([op@indets](%, 'R(identical(epsilon), anything)'), ((x, y) -> (op(2, x) < op(2, y)))));

 

convert(eliminate({eq_5_23, eq_5_23x, eq_5_22}, {Psi__ad, L__ad})[1], parfrac, L__fd);
 

F := 2*y*sin(beta*x)+6*z*cos(beta*x)+24*sin(beta*x)*cos(beta*x):
W := coeffs(F, {sin, cos}(beta*x), 'V'):
[W], [V];
if member(sin(beta*x), [V], 'i') then op(i, [W]) else 0 fi;
if member(cos(beta*x), [V], 'i') then op(i, [W]) else 0 fi;

 

Replace relevant lines (from Eq3..Sols) with:
Eq3 := factor(expand(value(algsubs(subs(params, tr3), Eq2))))
Eq31 := collect(numer(lhs(Eq3)), exp(z))
sys1 := [coeffs(Eq31, exp(z)), c=c0];
vars := indets([sys1], name) minus {c0};
Sols := map(allvalues, [solve(sys1, vars)]); NSols := nops(Sols);


Alternatively you can try:
Eq3 := factor(expand(value(algsubs(subs(params, tr3), Eq2))))
vars := {c, mu, seq(a[i], i = -1 .. 1), seq(b[j], j = -1 .. 1)}
Sols := map(allvalues, [solve]({c=c0, identity(Eq3,z)},vars)); NSols := nops(Sols);

This groups by leading coefficient:

Q:=proc(E)
local X;
if type(E, `+`) then X := [op]('E') else X := ['E'] fi;
ListTools:-Categorize(proc(x, y) lcoeff(x) = lcoeff(y) end, X);
end;
Q(pn);
map(add, [Q(expand(pn))]);
(add@map)(add, [Q(expand(pn))]);
(add@map)(proc(E) ``(lcoeff(E))*normal(E/lcoeff(E)) end@add, [Q(expand(pn))]);

 

Have you tried looking at:

dsolve(ode, y(x), 'formal_solution', 'coeffs' = 'mhypergeom');

After You've assigned Leq add this line:
Leq := expand(Leq):

Q:=map(x->`if`(type(x,even),1,0), LinearAlgebra:-RandomMatrix(3,3));
plots[sparsematrixplot](Q, matrixview);

 

Normalizer:=radnormal;
d1 := LinearAlgebra:-Determinant(A):
frontend(collect,[d1, indets(d1, radext(Non(constant))),distributed,factor],[{Non}(radext(Non(constant))),{}]);

or
d1 := LinearAlgebra:-Determinant(A):
radnormal(d1);
frontend(collect,[%, indets(%, radext(Non(constant))),distributed,factor],[{Non}(radext(Non(constant))),{}]);

fsolve(SYS,VAR,fulldigits);
 

In Maple I would suggest care and caution when mixing trigs, exps with algebra.
You're solving this:

A:=(20 + 20*T + 2*T*(T + 1))*exp(-T) - 10*exp(-2*T) - 2*T - 10.0 = 0;
S:=(solve,((E,V)->V))(expand(A),exp(T));
plot([S],T=0..10,view=[DEFAULT,-1..5],axes=boxed,scaling=constrained,color=[grey,grey,red]);

solve(evalc(Im(S[1]))=0);

This works better:

eq := a*x^3 + b*x^2 + c*x + d;
s := x1 + x2 + x3 = -b/a;
sp := x1*x2 + x1*x3 + x2*x3 = c/a;
p := x1*x2*x3 = -d/a;
eliminate({eq, s, p, sp}, {x});
sol := solve(%[2], {x1, x2, x3}, explicit):
#easier way to solve:
#sol := solve(identity(eq-a*(x-x1)*(x-x2)*(x-x3), x), {x1, x2, x3}, explicit=true);
# evaluate without assignment:
# eval( radnormal([sol], rationalized), [a=1, b=-5, c=6, d=-1]);
a := 1;
b := -5;
c := 6;
d := -1;
radnormal([sol], rationalized);

 

As demonstrated here:

f := proc(a)
   option operator, arrow;
   proc(b)
      option operator, arrow;
   a/b;
   end;
end;

 

2 3 4 5 6 7 8 Last Page 4 of 21