36 Reputation

15 years, 318 days

Improved?...

I would probably use the following tweaked version of Pagan's if statement in his procedure:

```if type(mp,`^`) and op(1,mp)=x then
op(2,mp),true;
else
degree(mp,x) &where
`and`(seq(`or`((op@map)(`and`@op,[solve(G,indets(G,name) minus
{constants})])),  G in PolynomialTools[CoefficientList](mp,x)[1..-2]));
end if;
```
```> Nilpotent(M);
5 &where {t = 0 and s = 0 and

/                z (-6 + w)                                       \
|w = w and y = - ---------- and z = z or w = 0 and y = y and z = 0| and
\                    w                                            /

2
w
w = w and y = y and z = -4 y + ---- and w = 0}
2
```

nothing...

I would call it at least a weakness in solve, for this problem it could return:

RootOf(_Z^2-RootOf(tan(_Z)+2*_Z,0.)), RootOf(_Z^2-RootOf(tan(_Z)+2*_Z,1.83659720),index=1), RootOf(_Z^2-RootOf(tan(_Z)+2*_Z,4.8158423178),index=1), RootOf(_Z^2-RootOf(tan(_Z)+2*_Z,7.917052685),index=1)

or give an indication that "Solutions May Be Lost".

solve help page...

It say on the help page: "assumptions on the independent variables may be ignored".  Solve really wants its conditions in the equations.

So, if there were an algebraic solution to this problem, it should be found by:

solve({sin(x^2)+2*x^2*cos(x^2) = 0, -1<=x, x<=3}, x);

but this doesn't return anything (probably a bug stemming from the lack of a closed form solution).

But it does work for something where closed form solutions can be found:

solve({x^6=6, -1<=x, x<=3}, x);

Con isn't a polynomial, but this seems to work fine for me.  Maybe your problem is that you are using 'sum' rather than 'add'.

```> seq(coeff(con,t^(-1/2+k)),k=0..3);
1/2          1/2         1/2
1/2                 2            2           2
1/2 2    ln(lambda), - ---------, - --------- + ---------, 0
2            4           2
2 lambda     2 lambda    3 lambda

1/2         1/2
1/2                2           2
1/2 2    ln(lambda) - --------- - ---------
2           4
6 lambda    2 lambda

```

convert/rational...

This might help:

convert(2.-x, rational);

mul...

I think maple is trying to compute a symbolic closed form for the product.  If you replace product with mul, it will probably work.

Piecewise...

You could make a piecewise expression like:

piecewise(x>=0 and x<=3, f, x>3 and x<=5, g, h);

```                         { f        0 <= x and x <= 3
{
{ g        3 < x and x <= 5
{
{ h            otherwise
```

Take a look at the help for piecewise for more detail.

What are you trying to solve?...

I don't think there is any way to answer your question without a specific example of your problem.

Normal Form...

_EnvExplicit:=true;  Doesn't always seem to put solutions in explicit form for solutions of systems of a polynomials.  I find solutions can be more useful and compact if left in implicit (RootOf) form.  Sometimes.

If the solutions are really big, you might be able to make more sense out a normal form like the Groebner basis, or it's factored form produced by Groebner:-Solve.

If you can post a specific example (as a worksheet if really large) people here might be able to lend better advice.

Bug Maybe?...

According the the solve,details help page, solve is not supposed to return RootOf form solutions of degree 2.  So maybe there is a bug here.

To put the solution in the expected form:

solve(sys, [x, y, z, lambda]):

```        1/2  1/2       1/2  1/2       1/2  1/2            1/2  1/2
3    S         3    S         3    S              3    S
[[[x = ---------, y = ---------, z = ---------, lambda = ---------]], [
3              3              6                  12

1/2  1/2         1/2  1/2         1/2  1/2              1/2  1/2
3    S           3    S           3    S                3    S
[x = - ---------, y = - ---------, z = - ---------, lambda = - ---------]]
3                3                6                    12

]

```

evalf/int and curry...

I would probably try:

`evalf/int`(curry(T,3.3),0..1);

implicitplot?...

One option is to look at the curves formed by the solutions of the equations using plots[implicitplot].  Another option is plot3d to look at the surfaces of their graphs as functions in two variables.  Either of those options is going to require some tweaking of your equations.  Exactly what you should do really depends on what you are trying to figure out about these equations.

Infinitely Many Solutions...

You only have one equation for your two variables, so there are an infinite number of solutions.

Calling solve on it directly, you get a description of them:

sol:={r_1 = -0.1440348680 + 5.800893388 r_2, r_2 = r_2}

Your particular solution is found by calling eval(sol, r_2=0.055);