Axel Vogt

5936 Reputation

20 Badges

20 years, 257 days
Munich, Bavaria, Germany

MaplePrimes Activity


These are replies submitted by Axel Vogt

If the function has some term like sqrt(1-t^2), then I would prefer to have
the strict condition -1 <= t <= t to be obeyed instead of using 'abs' inside.

Or more generally it would be convenient, if the domain of definition is
obeyed by the solver. That seems to be not clear, if the domain in not a
closed subset, like for 1 / sqrt(1-t^2).

Essentially: working with 'double precision' using Optimize[Minimum] the constraints
are only violated by small numerical amounts by the solution, which is found quickly.

Dare to work with high precision. The constraints now are violated by some tiny amount.


Now make the Ansatz: that gives rise to equations (educated: lives on the boundary).


Working through that and the experimental result "function = 4 is minimal" finally
results in the given 'solution' (missing: it *is* a minimum, guess one also has to
consider, that we are on a boundary).


And - of course - I do not have any idea, how Maple finds the initial values, I guess
it starts at the boundaries (which is of complex dimension = 2).


Find a sheet attached.
MP_minimize_hirny.mws (sorry, the stupid board software cuts off file names ...)
Essentially: working with 'double precision' using Optimize[Minimum] the constraints
are only violated by small numerical amounts by the solution, which is found quickly.

Dare to work with high precision. The constraints now are violated by some tiny amount.


Now make the Ansatz: that gives rise to equations (educated: lives on the boundary).


Working through that and the experimental result "function = 4 is minimal" finally
results in the given 'solution' (missing: it *is* a minimum, guess one also has to
consider, that we are on a boundary).


And - of course - I do not have any idea, how Maple finds the initial values, I guess
it starts at the boundaries (which is of complex dimension = 2).


Find a sheet attached.
MP_minimize_hirny.mws (sorry, the stupid board software cuts off file names ...)
Take one of the following settings and assume 0 <= B, B <= 1. 

t = (1-B^2)^(1/2), A = t-(t^2+B^2-1)^(1/2), u =  (1-t^2+t*(t^2+B^2-1)^(1/2))/B
t = (1-B^2)^(1/2), A = t+(t^2+B^2-1)^(1/2), u = -(-1+t^2+t*(t^2+B^2-1)^(1/2))/B

Then the function has the value 4 and all the constraints are satisfied (any c).

I will give a sketch later (my sheet is too ugly).

What I do miss: the value 4 is a local minimum.

Take one of the following settings and assume 0 <= B, B <= 1. 

t = (1-B^2)^(1/2), A = t-(t^2+B^2-1)^(1/2), u =  (1-t^2+t*(t^2+B^2-1)^(1/2))/B
t = (1-B^2)^(1/2), A = t+(t^2+B^2-1)^(1/2), u = -(-1+t^2+t*(t^2+B^2-1)^(1/2))/B

Then the function has the value 4 and all the constraints are satisfied (any c).

I will give a sketch later (my sheet is too ugly).

What I do miss: the value 4 is a local minimum.

As far as I 'know' you, that task is not for fun only ... what is the reason for it?

In my understanding such lists are to be read that formal way :-)

Anyway - you may upload 1 or 2 examples in a worksheet.

In my understanding such lists are to be read that formal way :-)

Anyway - you may upload 1 or 2 examples in a worksheet.

A simple change theta = 2*phi gives a result in terms of elliptic functions, which
is numerical correct (which is strange enough).

Trying to see, that these elliptic expressions are just a complicated identity for
Pi, I converted them back to integrals and evaluated.

Symbolically the result is 2*Pi, while numerically it is 1*Pi. Funny.

Where the correct solution follows by the change theta = arctan(t).


I hope it helps to locate the bug.

Find a sheet attached.
MP_int_trig_fals.mws
Here roughly for the poster and that special case again: 

"Int" just lets one write down the integral,
"value" gives the symbolic solution (if any).

"int" does that in just one step, "int" = "value(Int(...))".

Thus "evalf(int(...))" computes the numerical value of the symbolic solution,
while "evalf(Int(..))" comuptes it using a numerical integration scheme.

These - usually - are totally different ways.

As Alexandro already said: the symbolic solution is wrong, it is a bug.

If one puts all into 1 command like in the first case, the one can not see it.

There are other reasons to do it step-by-step. But as 'beginner' typing just
one more line may save you much time to find problems.

See the online help for evalf/Int, description
a := binomial(37, x-105)*.85^(142-x)*.15^(x-105);
convert(evalf(%), GAMMA); simplify(ln(%)) assuming 0<x;
f:=unapply(%, x);
0=diff(f(x),x); fsolve(%,x=100 .. 120);
exp(f(%));
      0.183208824656251
a := binomial(37, x-105)*.85^(142-x)*.15^(x-105);
convert(evalf(%), GAMMA); simplify(ln(%)) assuming 0<x;
f:=unapply(%, x);
0=diff(f(x),x); fsolve(%,x=100 .. 120);
exp(f(%));
      0.183208824656251

Have you tried to use the classical interface ?

I think it is better for controlling the input ...

PS for my answer below: sorry, obviously I did not
recognize the rule ... seems, it was too late ...

Have you tried to use the classical interface ?

I think it is better for controlling the input ...

PS for my answer below: sorry, obviously I did not
recognize the rule ... seems, it was too late ...

@acer 

Thank you - exactly that is what happens, after 1 (empty?) DOS windows in hangs up.

I will submit a bug report: it works in Maple 15.

First 88 89 90 91 92 93 94 Last Page 90 of 209