As you know, analyzing a circuit with phasors provides only the steady-state response, and is only useful for sinusoidal signals and DC signals. Fourier series allow us to analyse a circuit with general periodic signal that aren't necessarily sinusoids, but it still only provides the steady-state response, and I'd like to also determine the transient response.
On the other hand, the Laplace transform (and the Fourier transform according to some webpages) allows us to analyse a circuit with signals such as a decaying exponential (damped signal), a sinusoid, a damped sinusoid, a step, a ramp, an impulse, a piece-wise signal, etc.; and it provides both the steady-state and the transient response.
So far, so good. This is where my question comes. For a circuit with a sinusoidal AC input, the Laplace transform allows us to obtain the transient response. And for a circuit with a non-sinusoidal AC input, the Fourier series allow us to obtain the steady-state response. But how do we obtain the transient response of a circuit with a non-sinusoidal AC input? According to the above, do we have to apply the Laplace transform (or Fourier transform) of a Fourier series? Have you ever read or done an example like this?
An example
Just to say an example, let's suppose we have a series RC circuit with a sawtooth input (expression shown below), zero initial conditions (for simplifications), and we're interested in finding the complete response (transients + steady-state) of the voltage of the capacitor, assuming the input is zero for \$ t \lt 0 \$ and is active for \$ t \gt 0 \$. The circuit diagram is:
We are told that one period of the input is given by
\$ v_{s_{1}}(t) = \begin{cases} 2 t & , 0 < t < 5 \\ 0 & , 5 < t < 10 \end{cases} \tag*{} \$
where the period of the whole input \$ v_{s}(t) \$ is \$ 10 \$. Now, in order for the circuit to have transients, the input should be activated at \$ t = 0 \text{ s} \$ instead of \$ -\infty \$, because if the input was activated a long time ago (i.e. since \$ -\infty \$) then the circuit would have already reached steady-state at \$ 0 \text{ s} \$, and so transients would have disappeared and we could find the capacitor's voltage with Fourier series (and phasors) only, without the Laplace transform. Because of this, we have to multiply our input by the unit step or Heaviside function, \$ u(t) \$; this makes our input a causal signal.
My question is then how do we solve such an example?
What I've tried
What I tried in the previous example is my proposed solution: finding the Laplace transform of a trigonometric Fourier series. First, let's find the Fourier series of the input. The fundamental frequency of \$ v_{s}(t) \$ is \$ \omega_0 = \frac{\pi}{5} \frac{\text{rad}}{\text{s}} \$. I could prove that the average value of \$ v_{s}(t) \$ is
\$ a_0 = \dfrac{5}{2} \tag*{} \$
while its Fourier coefficients are
\$ a_n = 10 \dfrac{(-1)^n - 1}{(\pi n)^2}; b_n = - \dfrac{10 (-1)^n}{\pi n} \tag*{} \$
Thus, the trigonometric Fourier series of \$ v_{s}(t) \$ is
\$ v_{s}(t) = \left[ \dfrac{5}{2} + \displaystyle \sum_{n=1}^{\infty} \left( 10 \dfrac{(-1)^n - 1}{(\pi n)^2} \cos {\dfrac{\pi n t}{5}} - \dfrac{10 (-1)^n}{\pi n} \sin {\dfrac{\pi n t}{5}} \right) \right] u(t) \text{ V} \tag*{} \$
In the following image, the black curve is the waveform of \$ v_{s}(t) \$, and the red curve is the waveform of the previous expression up to the 60th harmonic:
Notice that the input is only periodic for \$ t \gt 0 \$, because for \$ t \lt 0 \$ the input is zero, due to the unit step function. As a second step, we go to the \$ s \$ domain. With respect to the input, since the Laplace transform is a linear operator (it's an integral), it's pretty easy to prove that the Laplace transform of a trigonometric Fourier series is given by the pair
\$ \left[ a_0 + \displaystyle \sum_{n=1}^{\infty} \left( a_n \cos {n \omega_0 t} + b_n \sin {n \omega_0 t} \right) \right] u(t) \iff \dfrac{a_0}{s} + \displaystyle \sum_{n=1}^{\infty} \left( a_n \dfrac{s}{s^2 + (n \omega_0)^2} + b_n \dfrac{n \omega_0}{s^2 + (n \omega_0)^2} \right) \tag*{} \$
Thus,
\$ V_s(s) = \dfrac{5}{2s} + \displaystyle \sum_{n=1}^{\infty} \left( 10 \dfrac{(-1)^n - 1}{(\pi n)^2} \dfrac{s}{s^2 + (\pi n/5)^2} - \dfrac{10 (-1)^n}{\pi n} \dfrac{\pi n/5}{s^2 + (\pi n/5)^2} \right) \tag*{} \$
With respect to the capacitor, its equivalent impedance is simply \$ 1/sC \$, and it has no initial conditions.
As a third step, we solve the circuit. Applying voltage divider in the capacitor we get that
\$ \begin{align} V_C(s) &= \dfrac{1/sC}{R + 1/sC} V_s(s) \\ &= \dfrac{1}{RCs + 1} \left[ \dfrac{5}{2s} + \displaystyle \sum_{n=1}^{\infty} \left( 10 \dfrac{(-1)^n - 1}{(\pi n)^2} \dfrac{s}{s^2 + (\pi n/5)^2} - \dfrac{10 (-1)^n}{\pi n} \dfrac{\pi n/5}{s^2 + (\pi n/5)^2} \right) \right] \end{align} \$
Lastly we have to take the inverse Laplace transform of the previous expression. But this is where I'm stuck! I can't figure out a way to do that.