Is it nonsensical to try to 'prove' Euler's 'formula' in real numbers? What is Wikipedia/proofwiki even doing? Euler's formula (...'for complex numbers'?) is simply
$$e^{iz} = \cos(z)+i\sin(z)$$
And 1 way to prove this is using complex Maclaurin series for the complex exponential, sine and cosine.
Now, there's a way to 'prove' the 'theorem' $e^{it} = \cos(t)+i\sin(t)$, which is often said to be 'Euler's formula (...for real numbers?)' without using the original formula above such as by using Maclaurin. And ok fine, I guess you can indeed get the Maclaurin series expansion of $e^z$ by defining $e^z$ simply as the unique solution of $g:\mathbb C \to \mathbb C, g'=g,g(0)=1$ without explicitly getting $e^z = e^x(\cos(y)+i\sin(y))$ then you can just let $z=it$ (i.e. let $(x,y)=(0,t)$).
But...
There's a 'proof' that Wikipedia does, again without using the original formula, 'by differentiation' (proofwiki does this too) where we consider the function $f:\mathbb R \to \mathbb C,f(t) = \frac{\cos(t)+i\sin(t)}{e^{it}}$, where $f$ is indeed well-defined and then show $f$ is identically 1.
Question 1: So what exactly is $h:\mathbb R \to \mathbb C, h(t)=e^{it}$ here assuming $e^z$ is defined simply as the unique solution of $g:\mathbb C \to \mathbb C, g'=g,g(0)=1$?
Goal: I'm asking if this option is strictly speaking sensible. Like those probability textbooks that talk about independence but are actually strictly speaking nonsensical. I wanna make sure there's no imprecision actually. If it's actually nonsensical, then I wanna be sure to specify that the same way I teach probability without measure theory: 'It's nonsensical but just play along.' And then in this case, which parts are nonsensical, and how should they be taught? Like in probability when we teach some nonsensical parts by 'assuming the function is "well-behaved"' or something.
Question 2: Alternatively, is there some textbook that 'proves' Euler's formula for real numbers based on the unique $g$ definition?
Anyhoo, guess for Question 1: It's $h(t)=g(0,t)$. Explicitly:
I think $h(t)=g(0,t)=u(0,t)+iv(0,t)$, where $g(z)=g(x,y)=u(x,y)+iv(x,y)$ is the unique solution to $g:\mathbb C \to \mathbb C, g'=g,g(0)=1$?
And then we can indeed show that

*

*$h$ is nowhere zero? (Probably we can show $g$ is nowhere zero?)


*$\frac{d}{dt} h(t) = ih(t)$, i.e. we have both $\frac{d}{dt} u(0,t) = -v(0,t)$ and $\frac{d}{dt} v(0,t) = u(0,t)$? (I think this is what proofwiki assumes too in another proof.)


*$-\frac{d}{dt} h(-t) = -ih(-t)$ ?


*As for differentiability of $h$, well I guess it follows from differentiability (or at least holomorphicity) of $g$?
Notes:

*

*No need for specifics. I can work it out. I just wanna know if Wikipedia is just doing nonsense or if there's something really possible behind 'proving' the 'formula' from an alternate definition of the complex exponential.


*Currently, my thought is that they're doing just some heuristic definition that $e^{(\text{whatever})(x)} = \text{whatever} \ e^{(\text{whatever})(x)}$. But eh maybe there's a rigorous justification that is somehow possible without getting the formula for $e^z$ explicitly.
 A: First develop differential calculus of curves $\mathbb{R} \to \mathbb{C}$.  The cool thing is that if you define the derivative in any sensible way, everything works out nicely.  For example, if you let $\gamma(t) = u(t) + iv(t)$ for real valued $u$ and $v$, and define $\gamma'(t) = u'(t) + iv'(t)$, then you can prove that all of the usual calculus rules work for derivatives including the product rule (where multiplication of complex numbers is used in the codomain), quotient rule (where division of complex numbers is used in the codomain), etc.
None of this requires you to understand the derivative of a function $\mathbb{C} \to \mathbb{C}$.  None of it uses the Cauchy-Riemann equations.
If you were going to try to define $\gamma(t) = e^{it}$ as a function $\gamma:  \mathbb{R} \to \mathbb{C}$ it would be reasonable to ask that $\gamma'(t) = ie^{it} = i\gamma(t)$ and that $\gamma(0) = 1$.
The "proof by differentiation" then goes through smoothly.
Let $\gamma: \mathbb{R} \to \mathbb{C}$ be a function with $\gamma'(t) = i\gamma(t)$ and $\gamma(0) = 1$.
Define $C(t) = \frac{\cos(t)+i\sin(t)}{\gamma(t)}$
Then $\begin{align*}
C'(t) &= \frac{\gamma(t)(-\sin(t) + i\cos(t)) - \gamma'(t)(\cos(t)+i\sin(t))}{\gamma(t)^2}\\
&= \frac{\gamma(t)(-\sin(t) + i\cos(t)) - i\gamma(t)(\cos(t)+i\sin(t))}{\gamma(t)^2}\\
&= \frac{(-\sin(t) + i\cos(t)) - i(\cos(t)+i\sin(t))}{\gamma(t)}\\
&= 0\\
\end{align*}
$
So $C$ is a constant function. Evaluating at $t=0$ shows that $C(t) = 1$, and the result follows.

Edit to reply to BCLC's comment.
The way that this calculus of complex curves interacts with the calculus of holomorphic functions is as follows:
If $\eta: \mathbb{R} \to \mathbb{C}$ is a curve, and $f: \mathbb{C} \to \mathbb{C}$ is a holomorphic function, then $f \circ \eta$ is another curve and the definitions of derivative are compatible according to the chain rule
$$
(f \circ \eta)'(t) = f'(\eta(t))\eta'(t)
$$
Here $f'(\eta(t))$ is the complex derivative of $f$ at $\eta(t)$, $\eta'(t)$ is as I defined it, and the product is the product of complex numbers.
Now let $\gamma: \mathbb{R} \to \mathbb{C}$ be the function I defined above (which we proved was equal to $\cos(t) + i\sin(t)$).
Let $\exp: \mathbb{C} \to \mathbb{C}$ be defined by $\exp'(z) = \exp(z)$ and $\exp(0)=1$.
Let $\eta: \mathbb{R} \to \mathbb{C}$ be defined by $\gamma(t) = it$.
I will argue that $\exp(\eta(t)) = \gamma(t)$.
We just need to verify that $\exp(\eta(t))$ satisfies the defining conditions of $\gamma$.
$
\begin{align*}
(\exp \circ \eta)'(t) &= \exp'(\eta(t))\eta'(t)\\
&=i\exp(\eta(t))
\end{align*}$
and clearly $\exp(\eta(0)) = \exp(0) = 1$.
So we must have $\exp(\eta(t)) = \gamma(t)$.
So $e^{it} = \cos(t) + i\sin(t)$.
A: It is not nonsensical. $h : \mathbb{R} \to \mathbb{C}$ given by $h(t) = e^{it}$ is the unique solution to $h'(t) = ih(t)$, $h(0) = 1$. More generally, the matrix exponential $h(t) = e^{tA}$ of an $n \times n$ complex matrix $A$ can be defined to be the unique solution to $h'(t) = Ah(t)$, $h(0) = I$. Of course, the solution is given by the usual power series expansion. This defines $e^{it}$, and it is easy to show that $\gamma(t) = e^{it}$ is a unit speed curve that starts at $(1, 0)$ and travels counterclockwise on the unit circle. This is essentially the definition of $(\cos(t), \sin(t))$, so we have Euler's formula. The approach is spelled out through scattered exercises and material in http://mtaylor.web.unc.edu/wp-content/uploads/sites/16915/2018/04/analmv.pdf
