Ask Your Question
0

'negative number to a fractional power not real' while computing inegral

asked 2015-05-19 10:38:31 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

Hi

I want to compute the following integral:

B=40
Ef=1.13*10^(-18)
KT=4.03*10^(-21)
mu=1.732*9.27*10^(-24)
f(t)=(sin(t)*(cos(t))^(3/2))/(exp((B*mu*cos(t)-Ef)/KT)+1)
numerical_integral(f,0,pi)

However, it gives me an error

"Exception ValueError: ValueError('negative number to a fractional power
not real',) in 'sage.gsl.integration.c_ff' ignored"

Can somebody resolve this?

Thanks and regards Ajit Kumar

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-05-19 14:09:42 +0200

calc314 gravatar image

Since $\cos(t)$ is negative for $\pi/2 < t \le \pi$, computing with $(\cos(t))^{3/2}$ is an issue. I do not think numerical_integral will handle complex values, but I could be wrong.

edit flag offensive delete link more

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: 2015-05-19 10:38:31 +0200

Seen: 175 times

Last updated: May 19 '15