TITLE: How do I find the error of a curve rather than points.
QUESTION [1 upvotes]: In school, I've learned numerous ways to compare sets of points to see how well the collection of data fits a curve, such as linear regression, and ways to compare sets of data to see how well they fit each other with methods like Chi-Squared. What is the most acceptable way to do the same for two curves? For example, in the picture I have attached, I am comparing blue (y=sin(2pix)) and green (y=sin(pix)-0.1) curves to black (y=sin(pi*x)) to see which is a better fit. If I were to sample every integer x value for the blue and black curves and compare them, I would find a perfect match, when in reality, the green curve matches much closer to the black curve for most other sampling resolutions. I understand this might be an edge case, but what is a reliable way to decide how close a curve matches another curve?
Curves Image

REPLY [1 votes]: The essence of least squares, or linear regression, is to minimize the $l^2$ (discrete case) or $L^2$ (continuous case) norm of the data.  So, a measure of how well curve $f(x)$ approximates curve $g(x)$ is given by
$$\int_{a}^{b} |f(x)-g(x)|^2 dx =: ||f-g||^2_{[a,b]}.$$
This measures the error on the interval $[a,b]$.
So, the curve $f(x)$ which better approximates $g(x)$ would be the curve with the smaller norm.


TITLE: Circling around this Circle
QUESTION [1 upvotes]: Circles with centers $P, Q$ and $R$, having radii $1, 2$ and $3$, respectively, lie on the same side of line $l$ and are tangent to $l$ at $P', Q'$ and $R'$, respectively, with $Q'$ between $P'$ and $R'$. The circle with center $Q$ is externally tangent to each of the other two circles. What is the area of triangle $PQR$?
On this problem, I was able to find the side lengths of PQ and QR (pretty obvious). I am not able to figure out how to find PR though. Can someone please help?

REPLY [1 votes]: Another way of solving this is to find $\angle PQR$. Your area will then be:
$$A_{\triangle PQR}=\frac12\cdot PQ\cdot PR\cdot\arcsin PQR$$

You can think of $\angle PQR$ as the sum of the following angles:
$$\angle PQR = \angle PQG +\angle RQK+\frac\pi2$$

It's very easy to see that $PQ=3$ and $QG=1$, therefore $PG=2\sqrt2$, thus:
$$\angle PQG=\arccos \left(\frac{1}{3}\right)$$
Since, $QR=5$ and $RK=1$, then $QK=2\sqrt6$, then:
$$\angle RQK=\arcsin\left(\frac1{5}\right)$$
From here, you get that the area:
$$\begin{align}
A_{\triangle PQR}&=\frac12\cdot3\cdot5\sin\left(\arccos\left(\frac1{3}\right)+\arcsin\left(\frac1{5}\right)+\frac\pi2\right)\\
&=\frac12\cdot15\cdot\frac{2}{15} \sqrt{2} \left(\sqrt{3}-1\right)\\
&=\sqrt{2} \left(\sqrt{3}-1\right)
\end{align}$$


TITLE: Understanding the Taylor expansion of the magnitude of a vector
QUESTION [0 upvotes]: I am working on some problems where I encountered the need to find the Taylor expansion of the magnitude cubed of a vector. I have looked at the answer but I cannot understand how the result was obtained. I can place the equation here and I will really appreciate if anyone can show me the explicit working to achieve the result. I have not been able to find any Taylor expansions of the magnitude of a vector anywhere on the internet
$$\frac{1}{\left|\underline{r} \pm \frac{1}{2} \underline{a}\right|^{3}} \approx \frac{1}{r^{3}}\left(1 \mp \frac{3}{2} \cdot \frac{\underline{a}\cdot\underline{r}}{r^{2}}\right)$$

REPLY [2 votes]: Since $|\vec x\pm \vec y|^2= x^2+y^2\pm 2\vec x\cdot \vec y$, $$\frac{1}{|\vec r+\frac 12 \vec a|^3} = \left(r^2 + \frac 14 a^2 \pm \vec r\cdot \vec a\right)^{-3/2} \\ = r^{-3}  \left(1+\frac{a^2}{4r^2} \pm \frac{\vec r\cdot \vec a}{r^2} \right)^{-3/2} $$
Presumably $a$ is so small to make $\frac{a^2}{4r^2} \approx 0$, in which case using $(1+x)^n \approx 1+nx$ gives $$r^{-3}\left(1\mp \frac 32 \cdot \frac{\vec a \cdot \vec r}{r^2} \right)$$