Autor |
Mesaj |
|
ce copilator folositi pentru a rula acest cod?
var('y')
def J(y):
return integrate( arctan( y*sin(x) ) , (x,0,pi/2) ).n()
def K(yCapat):
return integrate( ln( y+sqrt(1+y^2) )/y/sqrt( 1+y^2 ) , (y,0,yCapat) ).n()
for yCapat in [1, 2, 3]:
print "J(%d) = %8.6f K(%d) = %8.6f" % ( yCapat, J(yCapat), yCapat, K(yCapat) )
\end{verbatim}
\begin{verbatim}
J(1) = 0.845291 K(1) = 0.845291
J(2) = 1.297587 K(2) = 1.297587
J(3) = 1.546436 K(3) = 1.546436
|