Martin Thoma 11 năm trước cách đây
mục cha
commit
d2debc0e68

+ 49 - 0
documents/math-minimal-distance-to-cubic-function/math-minimal-distance-to-cubic-function.tex

@@ -1,5 +1,6 @@
 \documentclass[a4paper]{scrartcl}
 \usepackage{amssymb, amsmath} % needed for math
+\usepackage{mathtools}      % \xRightarrow
 \usepackage[utf8]{inputenc} % this is needed for umlauts
 \usepackage[english]{babel} % this is needed for umlauts
 \usepackage[T1]{fontenc}    % this is needed for correct output of umlauts in pdf
@@ -224,6 +225,53 @@ But can there be three points?
     \todo[inline]{Is this possible? http://math.stackexchange.com/q/553097/6876}
 \end{figure}
 
+As the point is already given, you want to minimize the following 
+function:
+
+\begin{align}
+    d:   &\mdr \rightarrow \mdr^+_0\\
+    d(x) &= \sqrt{(x_p,y_p),(x,f(x))}\\
+         &= \sqrt{(x_p-x)^2 + (y_p - f(x))^2}\\
+         &= \sqrt{x_p^2 - 2x_p x + x^2 + y_p^2 - 2y_p f(x) + f(x)^2}
+\end{align}
+
+Minimizing $d$ is the same as minimizing $d^2$:
+\begin{align}
+    d(x)^2    &= x_p^2 - 2x_p x + x^2 + y_p^2 - 2y_p f(x) + f(x)^2\\
+    (d(x)^2)' &= -2 x_p + 2x -2y_p(f(x))' + (f(x)^2)'\\
+           0  &\stackrel{!}{=} -2 x_p + 2x -2y_p(f(x))' + (f(x)^2)'
+\end{align}
+
+Now we use thet $f(x) = ax^2 + bx + c$:
+
+\begin{align}
+    0     &\stackrel{!}{=} -2 x_p + 2x -2y_p(2ax+b) + ((ax^2+bx+c)^2)'\\
+          &= -2 x_p + 2x -2y_p \cdot 2ax-2 y_p b + (a^2 x^4+2 a b x^3+2 a c x^2+b^2 x^2+2 b c x+c^2)'\\
+          &= -2 x_p + 2x -4y_p ax-2 y_p b + (4a^2 x^3 + 6 ab x^2 + 4acx + 2b^2 x + 2bc)\\
+          &= 4a^2 x^3 + 6 ab x^2 + 2(1 -2y_p a+ 2ac + b^2)x +2(bc-by_p-x_p)\\
+\end{align}
+
+\subsubsection{Solutions}
+As the problem stated above is a cubic equation, you can solved it
+analytically. But the solutions are not very nice, so I've entered
+
+\texttt{$0=4*a^2 *x^3 + 6 *a*b *x^2 + 2*(1 -2*e *a+ 2*a*c + b^2)*x +2*(b*c-b*e-d)$}
+
+with $d := x_p$ and $e := y_p$.
+
+to \href{http://www.wolframalpha.com/input/?i=0%3D4*a%5E2+*x%5E3+%2B+6+*a*b+*x%5E2+%2B+2*%281+-2*e+*a%2B+2*a*c+%2B+b%5E2%29*x+%2B2*%28b*c-b*e-d%29}{WolframAlpha} to let it solve. The solutions are:
+
+\textbf{First solution}
+
+\begin{align*}
+    x = &\frac{1}{6 \sqrt[3]{2} a^2} \sqrt[3]{(108 a^4 d+54 a^3 b+\sqrt{(108 a^4 d+54 a^3 b)^2+4 (12 a^3 c-12 a^3 e-3 a^2 b^2+6 a^2)^3})}\\
+        &-\frac{12 a^3 c-12 a^3 e-3 a^2 b^2+6 a^2}
+         {3 (2^{\frac{2}{3}}) a^2 \sqrt[3]{108 a^4 d+54 a^3 b+\sqrt{(108 a^4 d+54 a^3 b)^2+4 (12 a^3 c-12 a^3 e-3 a^2 b^2+6 a^2)^3}} }-b/(2 a)
+\end{align*}
+
+So the minimum for $a=1, b=c=d=0$ is:
+
+
 \subsection{Calculate points with minimal distance}
 \todo[inline]{Write this}
 
@@ -232,6 +280,7 @@ Let $f(x) = a \cdot x^3 + b \cdot x^2 + c \cdot x + d$ with $a \in \mdr \setminu
 $b, c, d \in \mdr$ be a function.
 
 \subsection{Number of points with minimal distance}
+
 \todo[inline]{Write this}
 
 \subsection{Special points}