I'm trying to calculate the rms current of a flyback converters primary switch node. The Waveform is shown below:
I'm okay with assuming it is a triangle wave with a duty cycle of 50%. The peak value is 1.25A and the Period time is 4u seconds.
I can calculate it using the following formula i found on the internet:

And i will find a RMS current of 0.51A what is right.
But my problem is when i try to calculate it with another method i believe is right i get a different anwser. I hope someone can point out me where i'm wrong. See my calculation below:
$$ I_{RMS} = \sqrt{\frac{1}{T}\cdot\int_{0}^{T}I^2(t)dt} $$
I then simplify the integral to an easy area calculation
$$\int_{0}^{T}I^2(t)dt = (0.5 \cdot 0.5T \cdot I_{PK})^2$$
I work this all out to the following:
$$I_{RMS} = \sqrt{\frac{1}{T}(0.5 \cdot 0.5T \cdot I_{PK})^2}$$
When i fill everything in:
$$I_{RMS} = \sqrt{\frac{1}{4\mu}(0.5 \cdot 0.5 \cdot 2\mu \cdot 1.25)^2} $$ $$I_{RMS} = 3.125\cdot10^{-4} A $$ I end up wrong. I think my problem is with the simplifaction. But it doesn't make sense to me why it should be wrong.
Thanks in advance. I hope my post is also inline with the forum guidlines. As this is my first post. So tips are also welcome
