If we define $\cos$ and $\pi$ based on the differential equation of a weight on a spring, how can we derive the properties of a triangle? If we use the differential equation $\frac{d^2y}{dx^2} = -y$, with initial conditions $y(0)= 1$ and $y'(0)=0$, we can obtain a Maclaurin expansion for the solution.
As it happens, this expansion is the cosine function, and the periodicity of the expansion is $2\pi.$
What if we defined cos and pi according to this formula? How could we then prove that the cosine function gives us the ratio of adj/hyp for a right angled triangle, and pi is the ratio of a circle's circumference to  its diameter?
Of course we conventionally define cos and pi using circles and triangles, because mankind investigated those things thousands of years before we learned how to solve differential equations. I am just wondering how it would work the other way around.
 A: It is indeed interesting to reverse the viewpoint, for then some of the presentation of trigonometry can indeed be streamlined (e.g. that $\sin’=\cos$ and $\cos’=-\sin$, the addition formulae etc; though some of this can be streamlined even more using the complex exponential function) if you merely assume the global existence and uniqueness to linear ODEs (and also basic differential and integral calculus).
So, let $C,S:\Bbb{R}\to\Bbb{R}$ be the unique functions (by the existence and uniqueness theorem) such that
\begin{align}
\begin{cases}
C’’&=-C\\
C(0)&=1\\
C’(0)&=0
\end{cases},
\quad\text{and}\quad
\begin{cases}
S’’&=-S\\
S(0)&=0\\
S’(0)&=1
\end{cases}
\end{align}
Also, let $V:=\{f:\Bbb{R}\to\Bbb{R}\,|\, f’’=-f\}$ be the vector space of functions satisfying the ODE in question. Now, here is a list of basic properties, mostly arising from the uniqueness part of the theorem.

*

*$\{C,S\}$ is linearly independent in $V$: suppose $a,b\in\Bbb{R}$ are such that $f:=aC+bS=0$. Then, we have $a=f(0)=0$, and $b=f’(0)=0$ (since $f=0$ identically). Thus, $\{C,S\}$ is a linearly independent set of functions.

*$\{C,S\}$ spans $V$: given any $f\in V$, consider the function $g=f(0)C+f’(0)S$. Then, you can easily see that $g’’=-g$, and $g(0)=f(0)$ and $g’(0)=f’(0)$. By uniqueness, we must have $g=f$, i.e $f=f(0)C+f’(0)S$, which proves spanning.

A fanicer way of saying this is that the map $V\to \Bbb{R}^2$, $f\mapsto (f(0),f’(0))$ is an isomorphism (the inverse map being $(a,b)\mapsto aC+bS$).

*

*Formula for derivatives of sine and cosine: we have $C’=-S$, because $(C’)’’=(C’’)’=(-C)’=-(C’)$, and $C’(0)=0$, and $(C’)’(0)=C’’(0)=-C(0)=-1$. This is exactly the ODE and initial conditions of the function $-S$, so by uniqueness, $C’=-S$. From here, we see $S’=(-C’)’=-C’’=C$.

*Pythagorean identity: By the chain rule and the above formulae for the derivatives, we have $[C^2+S^2]’=2CC’+2SS’=-2CS+2SC=0$, hence the function $C^2+S^2$ must be constant, with the constant value given by $C(0)^2+S(0)^2=1$. Hence, we have the Pythagorean identity $C^2+S^2=1$.

*Evenness of cosine, oddness of sine: The function $x\mapsto C(-x)$, satisfies the same ODE and initial conditions as $C$, hence by uniqueness $C(-x)=C(x)$, i.e $C$ is even. Likewise, $x\mapsto S(-x)$ satisfies the same ODE and initital conditions as $-S$, so by uniqueness, $S(-x)=-S$.

*Addition formula for cosine and sine: fix $y\in\Bbb{R}$ and consider the function $f(x)=C(x+y)$. Then, we have $f’’=-f$, and so by the second bullet point, $f=f(0)C+f’(0)S=C(y)C+[-S(y)]S$. Writing this out fully, we see that for all $x,y\in\Bbb{R}$, $C(x+y)=C(x)C(y)-S(x)S(y)$. By a similar argument, you can show that for all $x,y\in\Bbb{R}$, $S(x+y)=S(x)C(y)+C(x)S(y)$.

I’ll adopt just a slightly different approach to $\pi$ since it yields “more” along the way. As shown in analytic definition implies geometric definition of trigonometric functions, by using only the formulas $C’=-S$, $S’=C$, $C(0)>0$, and the fundamental theorem of calculus, we can prove the existence of a smallest number $\pi>0$ such that $C(\pi/2)=0$. Hence, $C$ decreases strictly from $1$ to $0$ on the interval $[0,\pi/2]$, while $S$ increases strictly from $0$ to $1$ on the interval $[0,\pi/2]$. So, combining with the Pythagorean identity it follows that the mapping $\phi(t)=(C(t),S(t))$ is a bijection from $[0,\pi/2]$ onto the closed first quadrant of the unit circle, $\{(x,y)\in\Bbb{R}^2\,:\, x,y\geq 0,\, x^2+y^2=1\}$. Furthermore, this parametrization has unit speed, because
\begin{align}
\|\phi’(t)\|=\|(C’(t),S’(t))\|=\|(-S(t),C(t))\|=\sqrt{C(t)^2+S(t)^2}=1.
\end{align}
So, this parametrizes the unit circle “uniformly”.
We now completely understand the functions $C$ and $S$ on the interval $[0,\pi/2]$. We can now use the addition formulae to understand these functions on all intervals of length $\pi/2$, such as $[\pi/2,\pi], [\pi,3\pi/2],[3\pi/2\pi]$. In particular, it is not hard to show that $t\mapsto (C(t),S(t))$ is now $2\pi$-periodic and maps $[0,\pi/2],[\pi/2,\pi],[\pi,3\pi/2],[3\pi/2,2\pi]$ bijectively onto the four closed quadrants of the unit circle (and is bijective as a map $[0,2\pi)\to S^1$).
Since $C(t)$ is the $x$-coordinate and $S(t)$ is the $y$-coordinate of this unit-speed parametrization of $S^1$, it follows (after some scaling and rigid motions) that the ratio of adjacent (resp. opposite) to hypotenuse of an arbitrary triangle is given by $C(t)$ (resp. $S(t)$) for some $t$ (depending on the triangle in question of course).
Finally, using scaling and rigid motions, the ratio $\frac{c}{d}$ (circumference/diameter) for an arbitrary circle is the same as for the unit circle, and hence
\begin{align}
\frac{c}{d}&=\frac{\text{circumference of unit circle}}{2}\\
&=\frac{1}{2}\int_0^{2\pi}\|(C’(t),S’(t))\|\,dt\\
&=\frac{1}{2}\int_0^{2\pi} 1\,dt\\
&=\pi.
\end{align}
A: You asked a natural question:

What if we defined cos and pi according to this formula? How could we then prove that the cosine function gives us the ratio of adj/hyp for a right angled triangle, and pi is the ratio of a circle's circumference to  its diameter?

One way is to then define the sine function as
$\;\sin(\theta) := \cos(\theta-\pi/2).\;$
Then verify that $\;\sin^2(\theta)+\cos^2(\theta)^2=1,\;$ and
assuming the Pythagorean theorem, that the function
$\;w: \theta \mapsto (\cos(\theta),\sin(\theta))\;$
parameterizes a unit circle. Each point in the first quadrant
of the-circle uniquely determines a right triangle with the
angle $\;\theta\;$ at the origin $\;(0,0)\;$ and the
right angle at $\;(\cos(\theta),0).\;$
The hypotenuse has length $1$ and the adjacent side has
length $\;\cos(\theta).\;$
For the circle circumference, the wrapping function $\;w\;$
maps to points on the circle with constant angular speed.
This can be done using the original differential equation
to prove that $\;\cos'(\theta)=-\sin(\theta)\;$ and
$\;\sin'(\theta)=\cos(\theta)\;$. Now this implies that the angular speed is one unit of arc for one unit of $\theta.$
As $\;\theta\;$ goes through one period from $\;0\;$ to
$\;2\pi\;$ to travel along the complete  circumference, this
implies that the circumference must be equal to $\;2\pi.$
There are a few details that could be proved better, but this
is essentially what is required.
