Trying to solve a second order differential equation with ode2 I get the following errors with ic2 and bc2.
(%i1) assume(c>0)$
(%i2) eq:'diff(y,x,2)+c^2*y=f(x)$
(%i4) sol:ode2(eq,y,x);
(sol) y=-(cos(c*x)*integrate(f(x)*sin(c*x),x)-sin(c*x)*integrate(f(x)*cos(c*x),x))/c+
%k1*sin(c*x)+%k2*cos(c*x)
(%i5) ic2(sol,x=0,y=a,'diff(y,x)=b);
integrate: variable must not be a number; found: 0
#0: ic2(soln=y = (-(cos(c*x)*'integrate(f(x)*sin(c*x),x)-sin(c*x)*'integrate(f(x)*cos(c*x),x))/c)+%k1*sin(c*x)+%k...,xa=x = 0,ya=y = a,dya='diff(y,x,1) = b)
-- an error. To debug this try: debugmode(true);
(%i6) bc2(sol,x=0,y=a,x=L,y=b);
integrate: variable must not be a number; found: 0
#0: bc2(soln=y = (-(cos(c*x)*'integrate(f(x)*sin(c*x),x)-sin(c*x)*'integrate(f(x)*cos(c*x),x))/c)+%k1*sin(c*x)+%k...,xa=x = 0,ya=y = a,xb=x = L,yb=y = b)
-- an error. To debug this try: debugmode(true);
It looks like the problem is that ic2 and bc2 are substituting x=0 inside integrate(...,x).
Diff:
Diff:
Trying again to fix formatting.