3
$\begingroup$

I'm wondering how to express this question in a form computable by Mathematica:

  • Assume $f(x), f^\prime (x),$ and $f^{\prime \prime} (x)$ exist and are continuous for all $x$.
  • $|f(x) - \sin x| \leq 1/3$ for all $x$.

Show that $f^{\prime \prime} (x)$ has at least one zero in the open interval $(0, 2 \pi)$.

My (incorrect) attempt is:

\!\(
\*SubscriptBox[\(\[ForAll]\), \(x\)]\(\((Abs[
    f[x]\  - \ Sin[x]\  <= \ 1/3])\)\ \(
\*SubscriptBox[\(\[Exists]\), \(x\  \[Element] \((0, 2\ \[Pi])\)\)]D[
     f[x], {x, 2}] == 0\)\)\)

Extended response to 64494's comment, below:

The above is Mathematica. Consider

Clearly (by its title and peer-reviewed publication) dealing with Mathematica. In that paper the author uses Mathematica to prove (or disprove) theorems about vector spaces.

A sample:

Reduce[!( *SubscriptBox[([ForAll]), (s)]( *SubscriptBox[([Exists]), (t)]\ s\ t\ < \ 0)), Reals]

The Mathematica statement can be read: "For all $s$, there exists a $t$ such that $s$ times $t$ is negative."

(This statement is of course FALSE, given the case $s=0$, and Mathematica computes precisely that answer.)

This is precisely the kind of automated reasoning I'd like to apply to the problem posed above.

Here's another example:

Resolve[ForAll[x, a x^2 + b x + c > 0]]

as listed here.

Mathematica is rather powerful for automated reasoning about equations and relations, but I had difficulty applying it to the problem stated above. I have a feeling somebody can solve it.

Clear?

$\endgroup$
5
  • $\begingroup$ David, I think that these links might be of interest to you since they are the demonstrations of the mean value theorem and intermediate value theorem. Not sure if you knew about these or not. Also, a clarifying question: are you trying to build a routine from scratch that does the trick or do you want to use built-in functions? $\endgroup$
    – bmf
    Commented Jan 3, 2023 at 6:52
  • $\begingroup$ I'm interested in using existential quantifiers (ForAll, Exists, ...) and such to "prove" this relation in Mathematica. In another context: Reduce[\!(* SubscriptBox["[ForAll]", RowBox[{"s", ",", RowBox[{"s", "[Element]", TemplateBox[{}, "Reals"]}]}]](* SubscriptBox["[Exists]", RowBox[{"t", ",", RowBox[{"t", "[Element]", TemplateBox[{}, "Reals"]}]}]]\ s\ t\ < \ 0))] $\endgroup$ Commented Jan 3, 2023 at 8:29
  • 2
    $\begingroup$ This is math, not Mathematica. At the present and in the near future ForAll and Exists do not deal with functions as variables. $\endgroup$
    – user64494
    Commented Jan 3, 2023 at 9:56
  • 2
    $\begingroup$ Quantification over functions is second-order logic. Mathematica's theorem prover works only for a subset of first-order logic. However, it may be possible to answer this if you restrict your $f$ to a certain class of functions parametrized by a finite set of parameters, e.g a truncated Taylor series. $\endgroup$
    – flinty
    Commented Jan 3, 2023 at 17:52
  • $\begingroup$ @flinty: I have strong doubts about trig polynomials instead of polynomials . $\endgroup$
    – user64494
    Commented Jan 3, 2023 at 17:55

2 Answers 2

5
$\begingroup$

The following shows a +/- band of 1/3 around Sin[x]

Plot[{Sin[x], Sin[x] + 1/3, Sin[x] - 1/3}, {x, 0, 2 Pi}]

enter image description here

In the interval {1,2] f must somewhere have a negative second derivative. Similar, it must have a positive second derivative somewhere in [4,5]. As the second derivative is continuous, it must have a zero somewheer in between.

$\endgroup$
5
  • 2
    $\begingroup$ Sorry, "In the interval {1,2] f must somewhere have a negative second derivative" is built on the sand. $\endgroup$
    – user64494
    Commented Jan 3, 2023 at 10:12
  • $\begingroup$ @user64494 If one has nothing to say, one should do so. $\endgroup$ Commented Jan 3, 2023 at 10:54
  • $\begingroup$ I think the intervals should be (0, π) and (π, 2π) in your argumentation. $\endgroup$ Commented Jan 3, 2023 at 10:57
  • 1
    $\begingroup$ " If one has nothing to say, one should do so": exactly. $\endgroup$
    – user64494
    Commented Jan 3, 2023 at 11:39
  • $\begingroup$ DanielHuber: I'm quite familiar with illustrating such results, but my question focusses on automated reasoning about such results. See my appended comment. $\endgroup$ Commented Jan 3, 2023 at 20:57
2
$\begingroup$

I appreciate the purpose of this question. Is to automate proof. @DanielHuber answer is almost a visual proof or at least motivates proof.

I have upvoted @DanielHuber

enter image description here

I apologize for the tardy nature of the post and of course for errors.

The inequalities, repeated use of mean value theorem and final intermediate value theorem could, perhaps,be mimicked in Mathematica but I am uncertain how to “automate reasoning”.

$\endgroup$
2
  • $\begingroup$ Thanks ubpdqn: I will try to translate the handwritten notes into Mathematica code and if I succeed will post the code in the original problem. $\endgroup$ Commented Jan 5, 2023 at 22:04
  • $\begingroup$ There is an error on third line. Inequality should read: -2/3<f(pi/2)-f(0)-1<2/3. Apologies for any other errors. It does not change the rest. $\endgroup$
    – ubpdqn
    Commented Jan 5, 2023 at 22:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.