What is the formula to make a semicircle graph that is continuous? By continuous I mean like a sine or cos graph but shaped like semicircles one after the other. Thanks
[Math] How to make a semicircle graph
circlesgraphing-functionstrigonometry
Related Solutions
DISCALIMER : This is a brute force method using coordinate geometry. A better method should exists.
Take the center of the large circle be $(0, 0)$. Then $P = (-4, 0)$ and $Q = (6, 0)$.
Now let $y = mx + c$ denote the line extending $LM$ on both sides, where $m, c \in \mathbb{R}$ are constants such that both the systems of equations,
$$y = mx + c$$ $$(x - (-4))^2 + y^2 = 6^2$$
and
$$y = mx + c$$ $$(x - 6)^2 + y^2 = 4^2$$
have only one unique solution.
From the first system we can work out, by substitution first and then by considering discriminant second, one required condition:
$$(2mc + 8)^2 - 4(m^2 + 1)(c^2 - 20) = 0$$ $$20 m^2 + 8mc - c^2 + 36 = 0$$
and similarly from the second system,
$$(2mc - 12)^2 - 4(m^2 + 1)(c^2 + 20) = 0$$ $$20m^2 + 12mc + c^2 - 16 = 0$$
Subtract the twice the second condition from thrice the first to eliminate $mc$:
$$3(20 m^2 + 8mc - c^2 + 36) - 2(20m^2 + 12mc + c^2 - 16)= 0$$ $$20m^2 -5c^2 + 140 = 0$$ $$c^2 = 4m^2 + 28$$
Now consider the sum of $4$ times the first condition and $9$ times the second condition to eliminate the constant term:
$$4(20 m^2 + 8mc - c^2 + 36) + 9(20m^2 + 12mc + c^2 - 16) = 0$$ $$52m^2 + 28mc + c^2 = 0$$ $$(2m + c)(26m + c)$$
From which we get either $c = -2m$ or $c = -26m$.
Using the results in the previous two parts, we see that there a few possibilities for $m$. Clearly $c = -2m$ has no solutions because
$$(-2m)^2 = 4m^2 + 28$$
has no solution for $m$. Hence $c = -26m$. Therefore
$$(-26m)^2 = 4m^2 + 28$$ $$672m^2 = 28$$ $$m = \pm \frac{1}{2\sqrt{6}}$$
Since from our geometric definition of $m$ being the gradient of the negatively sloped $LM$-extended, $m$ must be negative. Hence
$$m = -\frac{1}{2\sqrt{6}}$$
which leaves $$c = \frac{13}{\sqrt{6}}$$
Thus, the line $LM$ extended has equation $y = -\frac{1}{2\sqrt{6}}x + \frac{13}{\sqrt{6}}$
Now use the equation of $LM$ extended and the equation of the large circle (with radius $\frac{6 + 6 + 4 + 4}{2} = 10$,
$$x^2 + y^2 = 10^2$$
to find the coordinates of $L$ and $M$.
Finding the distance between $L$ and $M$ then becomes trivial (Pythagoras' Theorem).
N.B. $\operatorname{cs}(ACD)$ is the circle segment defined by the rays, $AC$ and $AD$.
In the piture below, we have that $$\operatorname{cs}(ACD)+\operatorname{cs}(BCD)$$ contains the part were looking for. However we have overcounted. Can you see by how much we overcounted (i.e. what we now need to substract)?
Best Answer
I believe the function $f:\mathbb R\to\mathbb R$ with
$$f(x)=(-1)^{\lfloor x/2\rfloor} \sqrt{1-(x-2\lfloor x/2\rfloor -1)^2}$$
will do the trick. Here $\lfloor x\rfloor$ denotes the greatest integer less than or equal to $x$.
Explanation:
(1) The semicircle: An equation for the circle of radius $r$ centered at $(a,b)$ is $(x-a)^2+(y-b)^2=r^2$, so the graph of the function $s:[0,2]\to\mathbb R$ with $$s(x) = \sqrt{1-(x-1)^2}$$ is the upper semicircle of radius $1$ centered at $(1,0)$ (to see this, solve the first equation for $y$ with $y\geq 0$ and put $a=1,b=0,r=1$).
(2) The periodicity: If $\lfloor x\rfloor$ denotes the greatest integer less than or equal to $x$, then $\lfloor x\rfloor \leq x <\lfloor x\rfloor + 1 $, so $0\leq x- \lfloor x\rfloor <1$ (the expression $x- \lfloor x\rfloor$ is often called the fractional part of $x$). The graph of the function $p:\mathbb R\to\mathbb R$ with $p(x) = x- \lfloor x\rfloor$ looks like a sawtooth wave. It coincides with the graph of $y=x$ on $[0,1)$ and is periodic with period $1$. So the graph of the equation $y/2 = p(x/2)$, which can be written $y=2p(x/2)$ looks similar but is scaled out by a factor of $2$ both horizontally and vertically; it coincides with the line $y=x$ on $[0,2)$ and is periodic with period $2$. Note that $$2p(x/2)=2(x/2-\lfloor x/2\rfloor) = x-2\lfloor x/2\rfloor$$
(3) Combining them: Now $2p(x/2)$ has the effect of mapping each interval $[2n, 2n+2)$ monotonically onto $[0,2)$, so we see that plugging this into $s$ gives a function $g:\mathbb R\to\mathbb R$ whose graph is a collection of semicircles over each interval $[2n,2n+2)$; we have
$$g(x) = s(2p(x/2)) = \sqrt{1-(2p(x/2)-1)^2}=\sqrt{1-(x-2\lfloor x/2\rfloor-1)^2}$$
(4) Flipping: Finally, note that the expression $(-1)^{\lfloor x/2\rfloor}$ alternates between $1$ and $-1$ on successive intervals $[2n,2n+2)$, so the function $f(x) = (-1)^{\lfloor x/2\rfloor}g(x)$ is what you want: $$f(x)=(-1)^{\lfloor x/2\rfloor}\sqrt{1-(x-2\lfloor x/2\rfloor-1)^2}$$
The factor $(-1)^{\lfloor x/2\rfloor}$ has the effect of flipping every other upper semicircle on the graph of $g$ to a "lower" semicircle for the graph of $f$, as desired.