Function extrema and Maple accuracy

In summary, The conversation discusses how to find the extreme values of a function using Maple and how to confirm the accuracy of the results. The teacher suggests using the Mean Value Theorem and making an assumption about the value of delta. By using the triangle inequality and bound estimates for the numerator and denominator of the derivative, the maximum deviation of the function can be calculated. This can be used to verify the accuracy of Maple's output.
  • #1
P3X-018
144
0
Hi,
I have a function

[tex] f(x) = \frac{\cos(x^2)+x}{x^2+2},\quad x\in[0,3] [/tex]

I have to find the extreme values of the function in in the range [0,3], with Maple, by solving f'(x) = 0. Maple will solve these numerical, and I get 3 values.
[itex]c_1 = 0.5345058769[/itex], [itex]c_2=1.732313261[/itex] and [itex]c_3=2.461303848 [/itex].
Now there is an uncertantity in this, which can be seen, by calculating f'(c), for c1 (which should be a maxima) it is f'(c1) = -2*10^(-10). Surly this value x = c1 most be a little to the right of the true value of the maxima. Now how can I confirm that there isn't anyvalues in a small range around c1, so that [itex] f(c_1-\delta) \gg f(c_1) [/itex] for a very small value of [itex]\delta>0[/itex]?
How can I use elementary Calculus rules/theorems to argument about this?
 
Physics news on Phys.org
  • #2
The teacher suggested using the Mean Value Theorem, and/or using that if is differentiable in a point a, then there exists a function [itex]\rho[/itex], such that

[tex] f(a+h) = f(a)+f'(a)h+\rho(h)h [/tex]

where the function has the property that [itex] \lim_{h\rightarrow0}\rho(h)=0[/itex] and [itex] \rho(0) = 0 [/itex] (so it has continuty in 0).

But I just can't see how I can use these methods to argue. I was hoping someone just could give a hint.
 
  • #3
There isn't any way to argue rigorously without knowing something about Maple's algorithms (because you don't know how large the [itex]\delta[/itex] is). But if you make an assumption, say, that [itex]\delta \leq 0.1[/itex], then you can try to bound [itex]f^\prime[/itex] and use the MVT argument above.

You should have something like

[tex]f^\prime (x) = -\frac{2x^3\sin (x^2)+4x\sin (x^2) + x^2 - 2 + 2x\cos (x^2)}{(x^2 + 2)^2}.[/tex]

Take this in absolute value and use the triangle inequality to bound the numerator by a polynomial [itex]P(x)[/itex], and call the denominator [itex]D(x)[/itex]. Note that D(x) is larger than P(x) for sufficiently large x (because it involves an [itex]x^4[/itex] term), so try to find some [itex]a\in \mathbb{R}[/itex] such that [itex]P(x) \leq aD(x)[/itex] for at least all x in [0,3]. Since you're using maple already, you had might as well just use it again (try a=2, and then try to make it as small as you can, though that's not too important!).

Then you'll have
[tex]|f^\prime(x)| \leq \frac{P(x)}{D(x)} \leq \frac{aD(x)}{D(x)} \leq a[/tex]

for all x in [0,3] and you can use the MVT argument with your estimated bound on [itex]\delta.[/itex]
 
Last edited:
  • #4
I don't quite understand how I should use that a and the MVT.

But I tried the following. Since f'(c1) = -2*10^(-10), the error is in the 10th decimal and beyond (I've put Digits = 10, the default value), so I tried to calculate some values of c1 - n*10^(-11), and check for what value of n, will I get f'(c1 - n*10^(-11)) < 0. And I get that this is true for n < 5.
But what does this proof? Is it enough as an argument?
 
  • #5
Well, if you can bound the derivative by [itex]a[/itex] and you assume a small deviation from the actual extremum (call the deviation [itex]\delta[/itex] and assume delta is smaller than some fixed value [a reasonable estimate for Maple's precision]) then you can put a bound on how much the function can deviate between the Maple output and the actual extremum.

It turns out that in fact

[tex]|f^\prime (x)| \leq 2[/tex]

for all x (and you can show this by the method I outline in my last post - this isn't a least upper bound, but it'll do for an estimate). So in fact, [itex]|f(x) - f(x-y)| \leq 2y[/itex] for all real x and y.

So if the real maximum is at [itex]C[/itex] and maple outputs [itex]c[/itex] and you assume that [itex]|C-c| = \delta \leq 0.1[/itex], say, then [itex]|f(C)-f(c)| \leq 2\delta \leq 0.2[/itex].

I have to admit this doesn't really look like anything involving the MVT. What is being used here is essentially the fund. theorem of calculus (which of course you need the MVT to prove):

If the max is at C and Maple outputs c, then you want to bound [itex]|f(C)-f(c)|[/itex]. Well, by the FTC,

[tex]f(C)-f(c) = \int_c^C f^\prime (x) dx[/tex]

and by an easy theorem this means

[tex]|f(C)-f(c)| \leq \int_c^C |f^\prime (x)|dx.[/tex]

Now, we've bounded [itex]|f^\prime (x)|[/itex] by [itex]a[/itex], so we just get

[tex]|f(C)-f(c)| \leq \int_c^C adx = a(C-c) = a\delta.[/tex]
 
Last edited:

Related to Function extrema and Maple accuracy

1. What are function extrema and how are they calculated?

Function extrema, also known as maxima and minima, are the highest and lowest points on a graph of a function. They are calculated by finding the points where the derivative of the function is equal to 0. This can be done analytically or using software such as Maple.

2. How accurate is Maple in calculating function extrema?

The accuracy of Maple in calculating function extrema depends on the complexity of the function and the precision settings used. Generally, Maple is considered to be very accurate in calculating extrema, but it is always recommended to check the results manually to ensure accuracy.

3. Can Maple handle functions with multiple extrema?

Yes, Maple is capable of handling functions with multiple extrema. It can accurately calculate all the local maxima and minima of a given function.

4. Are there any limitations to using Maple for finding function extrema?

One limitation of using Maple for finding function extrema is that it may not be able to handle very large or complex functions. In such cases, it is recommended to break down the function into smaller parts and then use Maple to find the extrema.

5. How can I improve the accuracy of Maple in calculating function extrema?

To improve the accuracy of Maple in calculating function extrema, you can increase the precision settings, use more advanced algorithms, or manually check the results. It is also important to have a good understanding of the function and its behavior to ensure accurate results.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • Advanced Physics Homework Help
2
Replies
36
Views
2K
  • Calculus and Beyond Homework Help
Replies
8
Views
344
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
Replies
2
Views
1K
  • Precalculus Mathematics Homework Help
Replies
15
Views
752
  • Linear and Abstract Algebra
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
Replies
16
Views
3K
  • Calculus and Beyond Homework Help
Replies
7
Views
2K
Back
Top