Function extrema and Maple accuracy

Click For Summary

Discussion Overview

The discussion revolves around finding the extreme values of the function f(x) = (cos(x^2) + x) / (x^2 + 2) within the interval [0, 3] using Maple software. Participants explore the implications of the derivative f'(x) and the accuracy of numerical solutions provided by Maple, particularly focusing on the uncertainty associated with the computed extrema.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant presents the function and the numerical extrema obtained from Maple, expressing concern about the accuracy of these values based on the derivative's behavior at those points.
  • Another participant suggests using the Mean Value Theorem (MVT) and a specific formulation involving a function ρ to analyze the behavior of f around the computed extrema.
  • A different participant notes the difficulty in making rigorous arguments without understanding Maple's algorithms and proposes bounding the derivative under certain assumptions.
  • One participant attempts to analyze the derivative's value at points near the computed extrema to assess the accuracy of the results, questioning the sufficiency of this approach as a proof.
  • Another participant discusses bounding the derivative and the implications of these bounds for the deviation of the function values, referencing the Fundamental Theorem of Calculus and its relation to the MVT.

Areas of Agreement / Disagreement

Participants express varying levels of uncertainty regarding the application of the Mean Value Theorem and the implications of their findings. There is no consensus on the best approach to rigorously confirm the accuracy of the extrema found using Maple.

Contextual Notes

Participants mention assumptions about the precision of Maple's numerical outputs and the bounds on the derivative, which may affect the validity of their arguments. The discussion includes attempts to establish conditions under which certain mathematical properties hold.

Who May Find This Useful

This discussion may be of interest to those studying numerical methods for finding extrema, the application of calculus theorems in practical scenarios, and the use of computational tools in mathematical analysis.

P3X-018
Messages
144
Reaction score
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
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.
 
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:
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?
 
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:

Similar threads

  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 36 ·
2
Replies
36
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 9 ·
Replies
9
Views
6K
  • · Replies 7 ·
Replies
7
Views
3K
Replies
8
Views
1K
  • · Replies 4 ·
Replies
4
Views
4K