From: SourceForge.net <noreply@so...>  20060224 21:43:36

Bugs item #541030, was opened at 20020408 10:21 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=541030&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 9 Submitted By: David Billinghurst (billingd) Assigned to: Nobody/Anonymous (nobody) Summary: integrate(sqrt(x+1/x2),x,0,1) wrong Initial Comment: The definite integral integrate(sqrt(x+1/x2),x,0,1) => 4/3 with cvs maxima/gcl under windows. The answer should be 4/3 according to Michael Wester, "A Review of CAS Mathematical Capabilities", 15 April 1995. (Problem 84). It definitely should be positive.  >Comment By: Raymond Toy (rtoy) Date: 20060224 16:43 Message: Logged In: YES user_id=28849 I think the cause of this is in intform in sin.lisp. The very last cond clause sets $radexpand to '$all when doing maximasubstitute. This causes sqrt((x1)^2) to be come (x1), which is not right. If we set $radexpand to '$true, the definite integral is evaluated to 4/3. Hurray! But the indefinite integral returns the integral. Boo!  Comment By: Pedro Fortuny Ayuso (pfortuny) Date: 20020708 13:35 Message: Logged In: YES user_id=519681 FWIW, mupad 2.5 linux gives: int(sqrt(x+1/x2),x); > int(sqrt(x+1/x2),x); (i.e. not evaluated). while int(abs(x1)/sqrt(x),x); > sign(x1)(2*x^(3/2)/32*x^(1/2)) which, when evaluated at 1 gives: 4/3*sign(0). ... ... ...  Comment By: Juan Hierro (buscaideas) Date: 20020611 20:03 Message: Logged In: YES user_id=528795 I am not sure whether this should be a real bug or just a funny consequence of the indetermination in the sign of a square root. Looking at the comment by toy@..., one may realize that the result is correct provided that the sign of the square root in the integrand is shared with that of (x1). This problems appears in much simpler funcions too. For instance, let us say one has f(x):=sqrt(x*x2*x+1); Then, the sin algorithm performs the integration with sqrt always positive, while the risch algorithm works with sqrt sharing the sign of (x1). factor(diff(integrate(f(x),x),x)); ==> sqrt(x*x2*x+1) factor(diff(risch(f(x),x),x)); ==> (x1) Is it wrong this behaviour? Should there be any way to specify which branch to employ when handling multivaluated functions? f(x) in this last situation may be either abs(x1), or (x1), or abs(x1), or (1x). sin seems to work with abs(x1) and risch with (x1). In the same way, sqrt(x+1/x2) is either abs(x1)/sqrt(x) or (x1)/sqrt(x) where both signs are admisible in sqrt(x). In this case, both sin and risch algorithms seem to work with (x1)/sqrt(x).  Comment By: David Billinghurst (billingd) Date: 20020409 23:23 Message: Logged In: YES user_id=365569 toy@... (toy@...) wrote: I guess maxima gets this wrong because it says: (C1) integrate(sqrt(x+1/x2),x); 3/2 2 x  6 SQRT(x) (D1)  3 which is only true if x1 is positive. For some reason it has assumed x1 is positive somewhere during integration. Yet another integration bug. Ray  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=541030&group_id=4933 