Your concept of "wave" is a little vague to me. But:
A) A "wave with constant frequency but varying amplitude" is (informally) what one have in AM : amplitude modulation. It can be shown that if the amplitud varies "slowly" (as compared with the main period), the signal can be expressed as a (in general, complicated) combination of sinusoids of frequencies near the main frequency.
In the wikipedia article it's shown the simplest case,
$ y(t)=[1 + M \cdot \cos(\omega_m t + \phi)]\cdot \sin(\omega_c t)$ Here we have a sinuosid of "central frequency" $\omega_c$ and its amplitude varies by a sinusoid of frequency $\omega_m$ ("modulation frequency"). It's easy to show (oops) that this signal can be expressed as the sum of three sinusoids of frequencies $\omega_c$, $\omega_c+\omega_m$ and $\omega_c -\omega_m$.
B) The sum of two sinusoids of same frequency and distinct amplitude (and perhaps phase) results in another sinusoid of the same frequency - this is easy, and it's fundamental property of sinusoids.
Well, in principle there's nothing wrong with the definitions you have. Mathematically, functions are defined extensionally, so two different-looking functions that have the same output on all inputs are actually the same function, just written in different forms.
That said, when dealing with custom user-specified functions that are periodic, I think it's easier to define them on an interval spanning one period, and then extend them to the rest of the real line using periodicity. That is, you define $g\colon [0,T)\to\mathbb R$ whatever way you like, where $T$ is the period of your waveform, and then let $f(x) = g(x\bmod T)$ for any $x\in\mathbb R$. For your examples, I'd define
$$\begin{align}
g_{\text{sawtooth}}(x) &= \frac{2x}T-1, \\
g_{\text{square}}(x) &= \begin{cases}1&\text{if } x<T/2,\\-1&\text{if }x\ge T/2,\end{cases}\\
g_{\text{triangle}}(x) &= \begin{cases}\frac{4x}T-1&\text{if } x<T/2,\\3-\frac{4x}T&\text{if }x\ge T/2.\end{cases}
\end{align}$$
These are slightly different from the ones in your question. They all have amplitude $1$ and mean $0$, and the square and triangle waves behave sort of like $\sin$ and $-\cos$ respectively.
Now you want to integrate these. There's a nice way to integrate a periodic function, by breaking the interval of integration into periods:
$$\begin{align}
\int_0^xf(t)\,\mathrm dt &= \int_0^Tf(t)\,\mathrm dt+\int_T^{2T}f(t)\,\mathrm dt+\cdots+\int_{(n-1)T}^{nT}f(t)\,\mathrm dt+\int_{nT}^xf(t)\,\mathrm dt \\
&= n\int_0^Tf(t)\,\mathrm dt+\int_0^{x-nT}f(t)\,\mathrm dt.
\end{align}$$
If you pick $n=\lfloor x/T\rfloor$, and use the fact that $f(t)=g(t)$ when $t\in[0,T)$, this becomes
$$\int_0^xf(t)\,\mathrm dt=nT\bar g+\int_0^{x\bmod T}g(t)\,\mathrm dt,$$
where $\bar g$ is the mean value of $g$ over $[0,T)$. (This is one reason why I made it zero in the above examples, so this term drops out.) So all you really need to find analytically is the indefinite integral of $g$ over $[0,T)$. I imagine you can do that, especially with the simple definitions above.
Best Answer
The fundamental frequency is the inverse of the period (if you measure phase in cycles) or $2 \pi$ divided by the period (if you measure in radians). The Fourier expansion is shown here as $\dfrac 2\pi\displaystyle \sum_{k=1}^{\infty}(-1)^{k+1}\frac {\sin(2k\pi f t)}k$