# Thread: Mathematica Help - Inequalities and Maximization

1. Originally Posted by Winding Function
Shouldn't a*x^2 + b*x + c be in absolute value code?
Ok, same dif:

Code:
In[11]:=
Maximize[{Abs[a] + Abs[b] + Abs[c],
{Abs[a*x^2 + b*x + c] <= 100 &&
Abs[x] <= 1 && Element[{a, b, c},
Reals]}}, {a, b, c, x}]

During evaluation of In[11]:= Maximize::natt:
The maximum is not attained at any point satisfying the given \
constraints.  >>

Out[11]=
{Infinity, {a -> Indeterminate,
b -> Indeterminate, c -> Indeterminate,
x -> Indeterminate}}
For any large value of a, I can find suitable large negative (or positive) values of b and/or c such that $\displaystyle Abs[ax^2+bx+c]\leq 100$.

2. Originally Posted by shawsend
Ok, same dif:

Code:
In[11]:=
Maximize[{Abs[a] + Abs[b] + Abs[c],
{Abs[a*x^2 + b*x + c] <= 100 &&
Abs[x] <= 1 && Element[{a, b, c},
Reals]}}, {a, b, c, x}]

During evaluation of In[11]:= Maximize::natt:
The maximum is not attained at any point satisfying the given \
constraints.  >>

Out[11]=
{Infinity, {a -> Indeterminate,
b -> Indeterminate, c -> Indeterminate,
x -> Indeterminate}}
For any large value of a, I can find suitable large negative (or positive) values of b and/or c such that $\displaystyle Abs[ax^2+bx+c]\leq 100$.
So, you agree me?

3. Yes. I think we have this one and that's what I'd turn in if it was mine. Of course I thought that with another one in the Calculus forum recently that Opalg schooled me on so I'm more brave then bright.

4. Okay guys. Firstly, I believe the problem says to maximize |a|+|b|+|c| under the constraint that for all x such that |x|<=1, |ax^2+bx+c|<=100.
Otherwise, the question really doesnt make too much sense.

First, I suggest you consider the problem: If |ax^2+bx+c|<=100 is true at the extremes of the domain, it is true in the entire domain. The extremes are at the edges (x= ±1), and where x=-b/2a if |-b/2a|<=1. Plugging these values into the restriction, you get |a+b+c|<=100, |a-b+c|<=100, and if |-b/2a|<=1, then |c-b^2/4ac|<=100. Now we plug these into Maximize:
Maximize[{Abs[a]+Abs+Abs[c],If[Abs[b/(2 a)]£1,Abs[c-b^2/(4a)]£100,True]&&Abs[a+b+c]£100&&Abs[a-b+c]£100&&Abs[c]£100},{a,b,c}]

If you are too lazy to think that hard, this method also works, but is much harder for your computer.
First evaluate:
Reduce[ForAll[x,Abs[x]£1,Abs[ax^2+bx+c]£100],{a,b,c}]
Then evaluate:
Maximize[{Abs[a]+Abs[b]+Abs[c],%},{a,b,c}]

Maximize is too weak to expand the original inequality, so plugging it directly into reduce is fruitless. However reduce (the most powerful solving function in mathematica, it gives a completely rigorous expression that takes EVERYTHING into account. If reduce cant do it, mathematica cant do it)
Reduce gets rid of the ForAll quantifier, and gives back a LONG set of simple inequalities, combined with nested ands and ors. Maximize can deal with that, so you plug it into maximize, and it gives you the answer.

=)

Oh, and PS: Element[{a,b,c},Reals] is redundant because maximize by default assumes that the domain is the reals. Furthermore, the third argument of Maximize represents the domain, and using it makes the program faster. The only reason you would use that would be if X were a complex variable. Then it would look something like:
Maximize[{Expression to be maximized,And@@{List of other constraints}&&Element[{a,b,c},Reals]},{a,b,c,x},Complexes]
However, in this case x is a quantified real, so it has no buisness being listed as a variable.

PPS: if the answer were infinity, maximize would give {Infinity, {a ->A-value to make function infinity, b-value -> 0, c-value -> 100}}

The result is set up so that if you evaluate the following expression immediately after maximize it will return true:
Equation that you maximized/.%[[2]]==%[[1]]

Page 2 of 2 First 12