Is this is a forgetful integrate? This is strange. After you make the assume()'s it works the first time but not the
second time. If you reissue the assume then it will work again.
(%i26) facts();
(out26) [H > 0,d > 0,x >= 0,H > x,H > d,y > 0,H^2-(H-d)^2 > 0,H^2 > x^2]
(%i27) integrate(integrate(gam*(y-H+d),y,H-d,sqrt(H^2-x^2)),x,0,sqrt((H^2-(H-d)^2)));
(out27) gam*((3*d*H^2-3*H^3)*asin(sqrt(2*d*H-d^2)/H)+sqrt(2*d*H-d^2)*(3*H^2-2*d*H+d^2))/6
(%i28) integrate(integrate(gam*(y-H+d),y,H-d,sqrt(H^2-x^2)),x,0,sqrt((H^2-(H-d)^2)));
defint: upper limit of integration must be real; found sqrt(H^2-x^2)
-- an error. To debug this try: debugmode(true);
(%i29) assume(H^2>x^2);
(out29) [H^2 > x^2]
(%i30) integrate(integrate(gam*(y-H+d),y,H-d,sqrt(H^2-x^2)),x,0,sqrt((H^2-(H-d)^2)));
(out30) gam*((3*d*H^2-3*H^3)*asin(sqrt(2*d*H-d^2)/H)+sqrt(2*d*H-d^2)*(3*H^2-2*d*H+d^2))/6
(%i31) integrate(integrate(gam*(y-H+d),y,H-d,sqrt(H^2-x^2)),x,0,sqrt((H^2-(H-d)^2)));
defint: upper limit of integration must be real; found sqrt(H^2-x^2)
-- an error. To debug this try: debugmode(true);
(%i32) facts();
(out32) [H > 0,d > 0,x >= 0,H > x,H > d,y > 0,H^2-(H-d)^2 > 0,H^2 > x^2]
(%i33) assume(H^2>x^2);
(out33) [H^2 > x^2]
(%i34) facts();
(out34) [H > 0,d > 0,x >= 0,H > x,H > d,y > 0,H^2-(H-d)^2 > 0,H^2 > x^2]
(%i35) integrate(integrate(gam*(y-H+d),y,H-d,sqrt(H^2-x^2)),x,0,sqrt((H^2-(H-d)^2)));
(out35) gam*((3*d*H^2-3*H^3)*asin(sqrt(2*d*H-d^2)/H)+sqrt(2*d*H-d^2)*(3*H^2-2*d*H+d^2))/6
It goes on and on.
From: Gilberto E. Urroz
Sent: Thursday, September 16, 2010 10:20 AM
To: maxima at math.utexas.edu
Subject: Inconsistent behavior of "assume"
Hi,
I was trying to calculate the following double integral and I thought I had made the proper assumptions:
assume(H>0);assume(d>0);assume(x>=0);assume(H>x);assume(H>d);assume(y>0);
'integrate('integrate(gam*(y-H+d),y,H-d,sqrt(H^2-x^2)),x,0,sqrt((H^2-(H-d)^2)));ev(%,nouns);
However I get the following error message:
defint: upper limit of integration must be real; found sqrt(H^2-(H-d)^2)
-- an error. To debug this try: debugmode(true);
Now, if I add the assumption: H^2>(H-d)^2
then, the double integral works fine.
Question: shouldn't Maxima be able to conclude that H^2>(H-d)^2, given the assumptions:
H>0, d>0, H>d ?
Not a major issue, except that it took me about 15 mins. to figure it out.
--
Gilberto E. Urroz, Ph.D., P.E.
Associate Professor
Dept. of Civil & Environmental Engineering and
Utah Water Research Laboratory
Utah State University
Logan, UT 84322-4110
ph. 435-797-3379
fax 435-797-1185
gilberto.urroz at usu.edu
http://www.neng.usu.edu/cee/faculty/gurro/
--------------------------------------------------------------------------------
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima