On Tue, Dec 19, 2006 at 12:37:18PM -0500, Stavros Macrakis wrote:
> On 12/19/06, Seth Goldberg <sigoldberg1 at yahoo.com> wrote:
> > integrate(1+sin(x^2),x)
> > Returns a complicated expression. Persists after assume(x>0)
>
> Checking with differentiation, the returned expression appears to be correct.
It's not obvious how to do it so here's a cut and paste:
(%i31) integrate(1+sin(x^2),x);
(%o31) (sqrt(%pi)*((sqrt(2)*%i+sqrt(2))*erf(((sqrt(2)*%i+sqrt(2))*x)/2)+(sqrt(2)*%i-sqrt(2))*erf(((sqrt(2)*%i-sqrt(2))*x)/2)))/8+x
(%i32) diff(%,x);
(%o32) (sqrt(%pi)*(((sqrt(2)*%i+sqrt(2))^2*%e^(-((sqrt(2)*%i+sqrt(2))^2*x^2)/4))/sqrt(%pi)+((sqrt(2)*%i-sqrt(2))^2*%e^(-((sqrt(2)*%i-sqrt(2))^2*x^2)/4))/sqrt(%pi)))/8+1
(%i33) demoivre(%); /* superfluous...*/
(%o33) (sqrt(%pi)*(((sqrt(2)*%i+sqrt(2))^2*%e^(-((sqrt(2)*%i+sqrt(2))^2*x^2)/4))/sqrt(%pi)+((sqrt(2)*%i-sqrt(2))^2*%e^(-((sqrt(2)*%i-sqrt(2))^2*x^2)/4))/sqrt(%pi)))/8+1
(%i34) trigsimp(%);
(%o34) -(%e^(-%i*x^2)*(%i*%e^(2*%i*x^2)-2*%e^(%i*x^2)-%i))/2
(%i35) demoivre(%);
(%o35) -((cos(x^2)-%i*sin(x^2))*(%i*(%i*sin(2*x^2)+cos(2*x^2))-2*(%i*sin(x^2)+cos(x^2))-%i))/2
(%i36) trigexpand(%);
(%o36) -((cos(x^2)-%i*sin(x^2))*(%i*(-sin(x^2)^2+2*%i*cos(x^2)*sin(x^2)+cos(x^2)^2)-2*(%i*sin(x^2)+cos(x^2))-%i))/2
(%i37) trigsimp(%);
(%o37) sin(x^2)+1(%i38)
Whew!!!
--
Daniel Lakeland
dlakelan at street-artists.org
http://www.street-artists.org/~dlakelan