I have no idea where I went wrong with this homework question:
The waveform:
I deduced the function as:
$$ y=\begin{cases} 1000t & t\in [ 0,0.002]\\ -1000t+4 & t\in [ 0.002,0.006]\\ 1000t-8 & t\in [ 0.006,0.008] \end{cases} $$
Squaring both sides yields:
$$ \displaystyle y^{2} =\begin{cases} 1,000,000t^{2} & t\in [ 0,0.002]\\ 1,000,000t^{2} -8000t+16 & t\in [ 0.002,0.006]\\ 1,000,000t^{2} +16000t+64 & t\in [ 0.006,0.008] \end{cases} $$
Then I just let Matlab compute for me using the following code:
clearvars;
syms t;
y1=(1000*t)^2;
y2=expand((-1000*t+4)^2);
y3=expand((1000*t+8)^2);
y=int(y1,0,0.002)+int(y2,0.002,0.006)+int(y3,0.006,0.008)
sqrt(y/0.008)
The above code gives me an answer of \$\displaystyle \frac{2\sqrt{3}\sqrt{43}}{3} =7.57\$, which is obviously wrong since the peak current is only 2 amperes.
I have no idea where I went wrong in my steps.


y3=expand((1000*t-8)^2);that is _-_8, not +8 \$\endgroup\$