# Question:How to solve complex DAE with initial condition

## Question:How to solve complex DAE with initial condition

Maple , Maple Toolboxes

Please help me to check this procedure for solving complex DAE, I want to plot this error figures

There are some errors for the initial conditions?

restart;
with(plots);
w := 10;
L :=0.001;
R :=1;
u(t) :=exp(I*w*t) + 2* exp(I * 2 * w * t);
daesys:={diff(I3(t),t) = 1/L*u(t), I1(t) = I3(t) + 1/R * u(t), I1(0)=0, I3(0)=0};
dsys1:= map(eq -> (evalc(Re(eq)), evalc(Im(eq))), eval(daesys, {x(t) = xre(t) + I*xim(t), y(t) = yre(t) + I*yim(t)}));
dsol1 := dsolve(dsys1,numeric, method =rkf45_dae,abserr=10^(-10),relerr=10^(-10),range=0..8,maxfun = 0,output=listprocedure);

fy:= eval(t, dsol1);
fy1:= eval(I1(t), dsol1);
fy3:= eval(I3(t), dsol1);

for k from 1 to 1000 do
tt[k] := eval(fy(0.008 * k));
fI1[k] := eval(fy1(0.008*k));
fI3[k] := eval(fy3(0.008*k));
end do:
N := 1000:
s1 := seq([tt[p], fI1[p]], p = 1..N):
s3 := seq([tt[p], fI3[p]], p = 1..N):
s4 := seq([tt[p], fI1[p] - fI1[p - 1]], p = 2..N):
s6:= seq([tt[p], fI3[p] - fI3[p - 1]], p = 2..N):
with(plots): plot([s1]); plot([s3]); plot([s4]);plot([s6]);

﻿