Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Function extrema and Maple accuracy

  1. Sep 22, 2006 #1
    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?
     
  2. jcsd
  3. Sep 23, 2006 #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.
     
  4. Sep 23, 2006 #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: Sep 23, 2006
  5. Sep 23, 2006 #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?
     
  6. Sep 23, 2006 #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: Sep 23, 2006
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?