I was given 2 equations in order to find the current. I tried to find the relative error, but i got a curve which doesn't make any sense to me -at least-.
a = 0:.0001:pi;
a0 = .2744;
ws = .5;
I2 = (-sin(pi/ws)/(cosh(pi*a0/ws)+cos(pi/ws)));
Ucpw = (((a0*sin(pi/ws)-sinh(pi*a0/ws))/(cosh(a0*pi/ws)+cos(pi/ws))));
exp2 = exp(-a0/ws*a);
I1 =(-sin(1/ws*pi))/(cosh(a0/ws*pi)+cos(1/ws*pi));
phi2 = atan(-I2/(1-Ucpw - a0*I2));
i1 = exp2.*(I1.*cos(1/ws.*a)+(1-Ucpw-a0*I1).*sin(1/ws.*a));
i2 = (-I2./sin(phi2)).*exp2.*sin(a/ws - phi2);
e = abs((i1-i2)./i1);
plot(a,e)
Var a stands for the angle which should be displayed in radians, Does this curve mean that the solutions have error only at pi/2 with the amplitude of 5.05e-12?

a = 0:.0001:pi; plot(acos(cos(a))-a);- Danielepsfunction. - Daniel