Ask Your Question
1

Error in integral

asked 2020-08-25 15:50:58 +0100

gabrielromao5 gravatar image

I've got this error on the second integral. I put the code on wxMaxima and returned sucessfull. On wxMaxima, raise a question "z is positive, negative or zero?", also on sage, but on sage I can't answer that. How can I correct this?

x,y,z = var("x y z")

function = x*e^(-y)

integral(function,y,0,ln(x)).integral(x,0,2*z)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-08-25 16:35:55 +0100

tmonteil gravatar image

You can add some assumption:

sage: assume(z > 0)                                                                                                                                                                                          
sage: integral(function,y,0,ln(x)).integral(x,0,2*z)                                                                                                                                                         
2*z^2 - 2*z
edit flag offensive delete link more

Comments

A few alternatives :

sage: with assuming(z>0): integral(function,y,0,ln(x)).integral(x,0,2*z)
2*z^2 - 2*z
sage: with assuming(z<0): integral(function,y,0,ln(x)).integral(x,0,2*z)
2*z^2 - 2*z
sage: integral(function,y,0,ln(x)).integral(x,0,2*z, algorithm="sympy")
2*z^2 - 2*z
sage: integral(function,y,0,ln(x)).integral(x,0,2*z, algorithm="giac")
2*z^2 - 2*z
sage: integral(function,y,0,ln(x)).integral(x,0,2*z, algorithm="fricas")
2*z^2 - 2*z
Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2020-08-25 19:55:05 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-08-25 15:50:58 +0100

Seen: 337 times

Last updated: Aug 25 '20