I was able to demonstrate that for a signal $x(t)$ real, we can write the truncated Fourier series as:
$x_N (t) = A_0 +\sum\limits_{k=1}^{N}A_k\cos(kω_0t + \varphi_k)$, but now I've been given the signal shown below:
And now I have to find the values of $A_0, A_1, A_2, A_3, A_4, A_5, A_6, A_7, \varphi_1, \varphi_2, \varphi_3, \varphi_4,\varphi_5, \varphi_6, \varphi_7$
First attempt:
I know $A_0$ is equal to the area of the graph during one period divided by the value of the period. I know $T_0=0.4$ s, so $A_0=\frac{0.3*2}{0.4}=1.5$ and I wrote $x(t)$ between 0 and 0.4 as:
$$x(t)= \begin{cases} 0& 0<t<0.1 \\ 20t &0.1<t<0.2 \\ -10t+8 &0.2<t<0.4 \end{cases}$$
I also calculated $\omega_0=\frac{2\pi}{T_0}=\frac{2\pi}{0.4}=5\pi$, but then I tried calculating the $a_k$ coefficients using the integral definition: $a_k=\frac{1}{2} \int_{0.1}^{0.2} 20t\ e^{-jk\omega_0t} \,dt\ +\ \frac{1}{2} \int_{0.2}^{0.4} (-10t+8)\ e^{-jk\omega_0t} \,dt$ but my teacher said the goal wasn't to calculate the integrals and that there was a much easier way to find the values of $A_0, A_1, A_2, A_3, A_4, A_5, A_6, A_7, \varphi_1, \varphi_2, \varphi_3, \varphi_4,\varphi_5, \varphi_6, \varphi_7$, but I just don't know where to go from here.
Second attempt:
I know that:
$\frac{dx}{dt}(t) \rightarrow\ j\omega X(j\omega)$
And that:
$$x'(t)= \begin{cases} 0& 0<t<0.1 \\ 20 &0.1<t<0.2 \\ -10 &0.2<t<0.4 \end{cases}$$
So, if $x(t)=\frac{1}{2\pi} \int_{-\infty}^{+\infty} X(j\omega)\ e^{j\omega t} \,d\omega$, then $x'(t)=\frac{1}{2\pi} X(j\omega)\ e^{j\omega t}$
So, I find $$X(j\omega)=\frac{x'(t)2\pi}{e^{j\omega t}}$$
Because $T\cdot a_k=X(jk\omega_0)$ I assumed that I could write $a_k$ as:
$$a_k=\frac{X(jk\omega_0)}{T}=\frac{x'(t)2\pi}{e^{jk\omega_0 t}}$$
$$a_k= \begin{cases} 0& 0<t<0.1 \\ \cfrac{40\pi}{e^{jk5\pi t}} &0.1<t<0.2 \\ \cfrac{-20\pi}{e^{jk5\pi t}} &0.2<t<0.4 \end{cases}$$
But now I'm stuck again.