The problem is the routine sce-int, which uses the following formula:

(%i7) integrate(exp(a*x)*sin(b*x),x);

(%o7) %e^(a*x)*(a*sin(b*x)-b*cos(b*x))/(b^2+a^2)

But for a=%i and b=1 this does not work. b^2+a^2 is zero and we get the error division by zero.

A correct solution after a fix is:

(%i8) integrate(exp(%i*x)*sin(x),x);

(%o8) %i*x/2-%e^(2*%i*x)/4

This is a possible fix:

(defun sce-int (exp s-c var)

(let* ((e-coef (car (islinear (caddr exp) var)))

(sc-coef (car (islinear (cadr s-c) var)))

(sc-arg (cadr s-c))

(abs-val (add (power e-coef 2) (power sc-coef 2))))

(if (zerop1 abs-val)

;; The numerator is zero. Exponentialize the expression

;; and try again.

($expand (integrator ($exponentialize (mul exp s-c)) var))

(mul (div exp (add (power e-coef 2) (power sc-coef 2)))

(add (mul e-coef s-c)

(if (eq (caar s-c) '%sin)

(mul* (neg sc-coef) `((%cos) ,sc-arg))

(mul* sc-coef `((%sin) ,sc-arg))))))))

Dieter Kaiser