2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-19 11:38:05 +02:00

removed unnecessary stuff; began developing solution formula

This commit is contained in:
Martin Thoma 2013-12-05 23:49:36 +01:00
parent 3756091c61
commit ce25d17b75

View file

@ -306,110 +306,20 @@ As you can easily verify, only $x_1$ is a minimum of $d_{P,f}$.
\subsection{Number of points with minimal distance}
\subsubsection{Two points with minimal distance}
Quadratic functions can have two points with minimal distance.
\begin{theorem}
A point $P$ has either one or two points on the graph of a
quadratic function $f$ that are closest to $P$.
\end{theorem}
For example, let $f(x) = x^2$ and $P = (0,5)$. Then $P_{f,1} = (\sqrt{\frac{9}{2}}, \frac{9}{2})$
has minimal distance to $P$, but also $P_{f,2} = (-\sqrt{\frac{9}{2}}, \frac{9}{2})$:
In the following, I will do some transformations with $f = f_0$ and
$P = P_0$ .
\begin{proof}
\begin{align}
d_{P,f}(x) &= \sqrt{(x-x_P)^2 + (f(x)-y_p)^2}\\
&= \sqrt{x^2 + (x^2-5)^2}\\
&= \sqrt{x^2 + x^4-10x^2+25}\\
&= \sqrt{x^4 -9x^2 + 25}\\
&= \sqrt{x^4 -9x^2 + \frac{81}{4}+\frac{19}{4}}\\
&= \sqrt{\left (x^2 - \frac{9}{2} \right )^2 + \frac{19}{4}}
\end{align}
Moving $f_0$ and $P_0$ simultaneously in $x$ or $y$ direction does
not change the minimum distance. Furthermore, we can find the
points with minimum distance on the moved situation and calculate
the minimum points in the original situation.
Obviously, $d_{P,f}$ is minimal for $x = \pm \sqrt{\frac{9}{2}} \qed$
\end{proof}
\begin{figure}[htp]
\centering
\begin{tikzpicture}
\begin{axis}[
%legend pos=north west,
axis x line=middle,
axis y line=middle,
grid = major,
width=0.6\linewidth,
height=8cm,
grid style={dashed, gray!30},
xmin=-3, % start the diagram at this x-coordinate
xmax= 3, % end the diagram at this x-coordinate
ymin= 0, % start the diagram at this y-coordinate
ymax= 5, % end the diagram at this y-coordinate
axis background/.style={fill=white},
xlabel=$x$,
ylabel=$y$,
%xticklabels={-2,-1.6,...,7},
%yticklabels={-8,-7,...,8},
tick align=outside,
minor tick num=-3,
enlargelimits=true,
tension=0.08]
\addplot[domain=-3:3, thick,samples=50, orange] {x*x};
\draw (axis cs:0,5) circle[radius=2.17];
\draw[red, thick] (axis cs:0,5) -- (axis cs:2.121,4.5);
\draw[red, thick] (axis cs:0,5) -- (axis cs:-2.121,4.5);
\addlegendentry{$f(x)=x^2$}
\end{axis}
\end{tikzpicture}
\caption{Two points with minimal distance}
\end{figure}
\subsubsection{Three points with minimal distance}
As discussed before, there cannot be more than 3 points on the graph
of $f$ next to $P$.
\todo[inline]{But can there be three points? O.b.d.A: $a > 0$.
As $c$ is moves the curve only up and down, we can o.b.d.A assume
that $c=0$.
$x=-\frac{b}{2a}$ is the minimum of $f$. If there are 3 points, this will
be one of them. The other two ones are symmetric by an axis through
$-\frac{b}{2a}$}
\begin{figure}[htp]
\centering
\begin{tikzpicture}
\begin{axis}[
legend pos=north west,
axis x line=middle,
axis y line=middle,
grid = major,
width=0.8\linewidth,
height=8cm,
grid style={dashed, gray!30},
xmin=-0.7, % start the diagram at this x-coordinate
xmax= 0.7, % end the diagram at this x-coordinate
ymin=-0.25, % start the diagram at this y-coordinate
ymax= 0.5, % end the diagram at this y-coordinate
axis background/.style={fill=white},
xlabel=$x$,
ylabel=$y$,
%xticklabels={-2,-1.6,...,7},
%yticklabels={-8,-7,...,8},
tick align=outside,
minor tick num=-3,
enlargelimits=true,
tension=0.08]
\addplot[domain=-0.7:0.7, thick,samples=50, orange] {x*x};
\draw (axis cs:0,0.5) circle[radius=0.5];
\draw[red, thick] (axis cs:0,0.5) -- (axis cs:0.101,0.0102);
\draw[red, thick] (axis cs:0,0.5) -- (axis cs:-0.101,0.0102);
\draw[red, thick] (axis cs:0,0.5) -- (axis cs:0,0);
\addlegendentry{$f(x)=x^2$}
\end{axis}
\end{tikzpicture}
\caption{3 points with minimal distance?}
\end{figure}
When move the $f$ and $P$ simultaneously in $x$ direction, you will not change the
results.
First of all, you move $f_0$ by $\frac{b}{2a}$, so
First of all, we move $f_0$ and $P_0$ by $\frac{b}{2a}$ in $x$ direction, so
\[f_1(x) = ax^2 - \frac{b^2}{4a} + c \;\;\;\text{ and }\;\;\; P_1 = \left (x_p+\frac{b}{2a},\;\; y_p \right )\]
Because:
@ -425,20 +335,28 @@ Then move $f_1$ and $P_1$ by $\frac{b^2}{4a}-c$ in $y$ direction. You get:
\[f_2(x) = ax^2\;\;\;\text{ and }\;\;\; P_2 = \left (x_p+\frac{b}{2a},\;\; y_p+\frac{b^2}{4a}-c \right )\]
As $f(x) = ax^2$ is symmetric to the $y$ axis, only points
$P = (0, y_p)$ could possilby have three minima.
$P = (0, w)$ could possilby have three minima.
Then compute:
\begin{align}
d_{P,f}(x) &= \sqrt{(x-x_P)^2 + (f(x)-y_p)^2}\\
&= \sqrt{x^2 + (ax^2-y_p)^2}\\
&= \sqrt{x^2 + a^2 x^4-2ay_p x^2+y_p^2}\\
&= \sqrt{a^2 x^4 + (1-2ay_p) x^2 + y_p^2}\\
&= \sqrt{\left (a^2 x^2 + \frac{1-2 a y_p}{2} \right )^2 + y_p^2 - (1-2 a y_p)^2}\\
&= \sqrt{\left (a^2 x^2 + \nicefrac{1}{2}-a y_p \right )^2 + (y_p^2 - (1-2 a y_p)^2)}\\
d_{P,f}(x) &= \sqrt{(x-x_{P})^2 + (f(x)-w)^2}\\
&= \sqrt{x^2 + (ax^2-w)^2}\\
&= \sqrt{x^2 + a^2 x^4-2aw x^2+w^2}\\
&= \sqrt{a^2 x^4 + (1-2aw) x^2 + w^2}\\
&= \sqrt{\left (a^2 x^2 + \frac{1-2 a w}{2} \right )^2 + w^2 - (1-2 a w)^2}\\
&= \sqrt{\left (a^2 x^2 + \nicefrac{1}{2}-a w \right )^2 + (w^2 - (1-2 a w)^2)}\\
\end{align}
For $y_p \leq \nicefrac{1}{2a}$ you only have $x = 0$ as a minimum.
For all other points, there are exactly two minima.
For $w \leq \nicefrac{1}{2a}$ you only have $x = 0$ as a minimum.
For all other points $P = (0, w)$, there are exactly two minima.
So the solution is given by
\[\underset{x\in\mdr}{\arg \min d_{P,f}(x)} = \begin{cases}
x_1 = todo \text{ and } x_2 = todo &\text{if } x_P = - \frac{b}{2a} \text{ and } y_p + \frac{b^2}{4a} - c > \frac{1}{2a} \\
x = todo &\text{if } x_P = - \frac{b}{2a} \text{ and } y_p + \frac{b^2}{4a} - c \leq \frac{1}{2a} \\
x = todo &\text{if } x_P \neq - \frac{b}{2a}
\end{cases}\]
\clearpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%