## maxima-bugs

 [Maxima-bugs] [ maxima-Bugs-2651868 ] integrate(sin(a*x+b)^2,x); incorrect answer. From: SourceForge.net - 2009-03-01 14:12:13 ```Bugs item #2651868, was opened at 2009-03-01 16:12 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2651868&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: Lisp Core - Integration Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Denis (digital7) Assigned to: Nobody/Anonymous (nobody) Summary: integrate(sin(a*x+b)^2,x); incorrect answer. Initial Comment: (%i39) integrate(sin(a*x+b)^2, x); (%o39) (-sin(2*(a*x+b))/2+a*x+b)/(2*a) And after that: (%i42) expand((-sin(2*(a*x+b))/2+a*x+b)/(2*a)); (%o42) -sin(2*a*x+2*b)/(4*a)+x/2+b/(2*a) But using risch function and integrating myself I've got another results: (%i40) risch(sin(a*x+b)^2, x); (%o40) -(sin(2*a*x+2*b)-2*a*x)/(4*a) sin(x)^2 = 1/2 * (1 - cos(2*x)) => sin(a*x+b)^2 = 1/2 * (1 - cos(2*a*x + 2*b)) \ \ \ |sin(a*x+b)^2 dx = 1/2 * (|dx - |cos(2*a*x + 2*b)dx) = \ \ \ = x/2 - 1/(2*a) * sin(2*a*x + 2*b) What does "b/(2*a)" mean? Where have maxima got it? P.S. I've attached a wxMaxima session file with these calculations. Best regards, Denis. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2651868&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-2651868 ] integrate(sin(a*x+b)^2,x); incorrect answer. From: SourceForge.net - 2009-03-01 16:00:26 ```Bugs item #2651868, was opened at 2009-03-01 09:12 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2651868&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: Lisp Core - Integration Group: None >Status: Pending >Resolution: Invalid Priority: 5 Private: No Submitted By: Denis (digital7) Assigned to: Nobody/Anonymous (nobody) Summary: integrate(sin(a*x+b)^2,x); incorrect answer. Initial Comment: (%i39) integrate(sin(a*x+b)^2, x); (%o39) (-sin(2*(a*x+b))/2+a*x+b)/(2*a) And after that: (%i42) expand((-sin(2*(a*x+b))/2+a*x+b)/(2*a)); (%o42) -sin(2*a*x+2*b)/(4*a)+x/2+b/(2*a) But using risch function and integrating myself I've got another results: (%i40) risch(sin(a*x+b)^2, x); (%o40) -(sin(2*a*x+2*b)-2*a*x)/(4*a) sin(x)^2 = 1/2 * (1 - cos(2*x)) => sin(a*x+b)^2 = 1/2 * (1 - cos(2*a*x + 2*b)) \ \ \ |sin(a*x+b)^2 dx = 1/2 * (|dx - |cos(2*a*x + 2*b)dx) = \ \ \ = x/2 - 1/(2*a) * sin(2*a*x + 2*b) What does "b/(2*a)" mean? Where have maxima got it? P.S. I've attached a wxMaxima session file with these calculations. Best regards, Denis. ---------------------------------------------------------------------- >Comment By: Raymond Toy (rtoy) Date: 2009-03-01 11:00 Message: Both results are correct. They only differ by the constant b/(2*a). The derivative of each, after some manipulations, equals the integrand. Not sure what you're asking about "b/(2*a)". If you really want to know how maxima got it you'll have to dig into the integration routines. Marking as pending/invalid. Please update if this analysis is incorrect. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2651868&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-2651868 ] integrate(sin(a*x+b)^2,x); incorrect answer. From: SourceForge.net - 2009-03-01 17:24:29 ```Bugs item #2651868, was opened at 2009-03-01 16:12 Message generated for change (Comment added) made by digital7 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2651868&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: Lisp Core - Integration Group: None >Status: Open Resolution: Invalid Priority: 5 Private: No Submitted By: Denis (digital7) Assigned to: Nobody/Anonymous (nobody) Summary: integrate(sin(a*x+b)^2,x); incorrect answer. Initial Comment: (%i39) integrate(sin(a*x+b)^2, x); (%o39) (-sin(2*(a*x+b))/2+a*x+b)/(2*a) And after that: (%i42) expand((-sin(2*(a*x+b))/2+a*x+b)/(2*a)); (%o42) -sin(2*a*x+2*b)/(4*a)+x/2+b/(2*a) But using risch function and integrating myself I've got another results: (%i40) risch(sin(a*x+b)^2, x); (%o40) -(sin(2*a*x+2*b)-2*a*x)/(4*a) sin(x)^2 = 1/2 * (1 - cos(2*x)) => sin(a*x+b)^2 = 1/2 * (1 - cos(2*a*x + 2*b)) \ \ \ |sin(a*x+b)^2 dx = 1/2 * (|dx - |cos(2*a*x + 2*b)dx) = \ \ \ = x/2 - 1/(2*a) * sin(2*a*x + 2*b) What does "b/(2*a)" mean? Where have maxima got it? P.S. I've attached a wxMaxima session file with these calculations. Best regards, Denis. ---------------------------------------------------------------------- >Comment By: Denis (digital7) Date: 2009-03-01 19:24 Message: Thank you for your answer. Because I was calculating a definite integral for my complex work and checking the integration if Maxima, I haven't noticed that b/(2*a) is a constant. Some time later I'll dig into the integration routines. :) I think that topic is closed. Thank you again. ---------------------------------------------------------------------- Comment By: Raymond Toy (rtoy) Date: 2009-03-01 18:00 Message: Both results are correct. They only differ by the constant b/(2*a). The derivative of each, after some manipulations, equals the integrand. Not sure what you're asking about "b/(2*a)". If you really want to know how maxima got it you'll have to dig into the integration routines. Marking as pending/invalid. Please update if this analysis is incorrect. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2651868&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-2651868 ] integrate(sin(a*x+b)^2,x); incorrect answer. From: SourceForge.net - 2009-03-02 02:27:34 ```Bugs item #2651868, was opened at 2009-03-01 09:12 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2651868&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: Lisp Core - Integration Group: None >Status: Closed Resolution: Invalid Priority: 5 Private: No Submitted By: Denis (digital7) Assigned to: Nobody/Anonymous (nobody) Summary: integrate(sin(a*x+b)^2,x); incorrect answer. Initial Comment: (%i39) integrate(sin(a*x+b)^2, x); (%o39) (-sin(2*(a*x+b))/2+a*x+b)/(2*a) And after that: (%i42) expand((-sin(2*(a*x+b))/2+a*x+b)/(2*a)); (%o42) -sin(2*a*x+2*b)/(4*a)+x/2+b/(2*a) But using risch function and integrating myself I've got another results: (%i40) risch(sin(a*x+b)^2, x); (%o40) -(sin(2*a*x+2*b)-2*a*x)/(4*a) sin(x)^2 = 1/2 * (1 - cos(2*x)) => sin(a*x+b)^2 = 1/2 * (1 - cos(2*a*x + 2*b)) \ \ \ |sin(a*x+b)^2 dx = 1/2 * (|dx - |cos(2*a*x + 2*b)dx) = \ \ \ = x/2 - 1/(2*a) * sin(2*a*x + 2*b) What does "b/(2*a)" mean? Where have maxima got it? P.S. I've attached a wxMaxima session file with these calculations. Best regards, Denis. ---------------------------------------------------------------------- >Comment By: Raymond Toy (rtoy) Date: 2009-03-01 21:27 Message: Ok. Closing report. ---------------------------------------------------------------------- Comment By: Denis (digital7) Date: 2009-03-01 12:24 Message: Thank you for your answer. Because I was calculating a definite integral for my complex work and checking the integration if Maxima, I haven't noticed that b/(2*a) is a constant. Some time later I'll dig into the integration routines. :) I think that topic is closed. Thank you again. ---------------------------------------------------------------------- Comment By: Raymond Toy (rtoy) Date: 2009-03-01 11:00 Message: Both results are correct. They only differ by the constant b/(2*a). The derivative of each, after some manipulations, equals the integrand. Not sure what you're asking about "b/(2*a)". If you really want to know how maxima got it you'll have to dig into the integration routines. Marking as pending/invalid. Please update if this analysis is incorrect. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2651868&group_id=4933 ```