Re: Optimizing/minimizing functions that use absolute value.



On Dec 23, 6:59 pm, David W. Cantrell <DWCantr...@xxxxxxxxxxx> wrote:
"Peter Nachtwey" <pnacht...@xxxxxxxxxxx> wrote:
"David W. Cantrell" <DWCantr...@xxxxxxxxxxx> wrote in message
news:20071223180606.540$8b@xxxxxxxxxxxxxxxxx
"Peter Nachtwey" <pnacht...@xxxxxxxxxxx> wrote:
There is then no trouble differentiating or integrating absreal.

No such luck for me.  Mathcad refuses.
Can Mathematica solve problems like this?

That depends on how simple the problem is. For example, it succeeds
with both differentiation and integration of absreal itself:

In[9]:= absreal[x_] := Sqrt[x^2]

In[10]:= D[absreal[x], x]

Out[10]= x/Sqrt[x^2]

In[11]:= Integrate[absreal[x], x]

Out[11]= (x*Sqrt[x^2])/2

(By constrast, it returns D[Abs[x], x] and Integrate[Abs[x], x]
unevaluated.)

It always succeeds with problems of the form D[absreal[f[x]], x] if it
knows how to differentiate f itself. For problems of the form
Integrate[absreal[f[x]], x], whether it succeeds depends on the
function f,
as you might suspect.

David
I finally got answers but I had to do it this way
ftp://ftp.deltacompsys.com/public/NG/Mathcad%20-%20MinITAE2.pdf

Thanks for showing that.

I still think that Mathcad is doing this using numerically instead of
symbolically.  However the answer agree pretty much with what I have be
calculating numerically.  Mathcad chokes on the symbolic solutions.   If
I do try to get an answer it runs or locks up forever.

This is a difficult problem for computer algebra systems. I have two,
Mathematica and Derive, and neither is able to do this symbolically.

At your link above, you show the results a = 1.503 and error = 1.952 .
As best I can tell (and I could be wrong!), using your a value, the error
is 1.951879 and, thus, in agreement with your error value.

But with a = 1.506, I find error = 1.951862 and so perhaps your a value was
not quite optimal. But again, I could be wrong; the numerical integration
seems difficult.

David- Hide quoted text -

- Show quoted text -
If I display 8 digits and decrease the tolerance to 0.000000001 then
a=1.50487918
ERR=1.95185944

This shows two things.
1. I don't think 3 of us can be wrong. 1.503-1.506 is closer than
1.4.
2. There must not be a way to get the exact solution symbollically.

Peter Nachtwey
.



Relevant Pages

  • not a bug in integrate, Mma 6.0. But simplfication/assumptions
    ... You will need mathematica 6.0 or 5.* to try this. ... Integration is not, I think, inherent in the problem. ... expressions with assumptions is an issue, or that the Mma operation S/. ... but one generic to other computer algebra systems [most of which I ...
    (sci.math.symbolic)
  • Re: Thomas Covenant series
    ... I mean, I know what a slope is: the steeper the slope, the harder it is ... differentiation, then using it to find areas is one thing. ... taught that a good way to find areas is to use integration, ... So very young children get plastic scissors for cutting paper. ...
    (rec.arts.sf.composition)
  • Re: Thomas Covenant series
    ... That was my reaction too ... ... I think of integration as sum. ... The ratio in differentiation is ... Metaphors about onion skins, oysters, bits of grit and pearls ...
    (rec.arts.sf.composition)
  • Re: LISP routines to do symbolic differentiation
    ... But, I've tried Mathematica to integrate the function I have, ... methods other than indefinite integration, ... For the integration in the present thread, I'm guessing you want to do ... to find antiderivatives using genetic programming, ...
    (comp.lang.lisp)
  • Re: The Principle of Equivalence Explained
    ... converts to an instantaneous magnitude of momentum. ... differentiation and integration, as well, where you currently use only ... differentiation and integration will. ... Note that by letting the exponent ^2 in operate as the coefficient ...
    (sci.physics)

Quantcast