문제

How can you find the sin(i) with Sage?

I am trying to do some complex analysis with Sage.

The following commands are not working

sin(i)
sinh(i)
도움이 되었습니까?

해결책

Try

CDF(0,1).sin()  # or ComplexDoubleField(0,1)   CDF is just a shorthand

or

sin(CDF(0,1))

or

sin(1.0*I) # note the .0 to make it a float

Essentially CDF() creates a double-based complex number; the first argument is the complex part the second the imaginary part.
ComplexDoubleElement() does the same (I think less tolerant of "odd" types).
I'm not sure of the relation of these with ComplexNumber(). (maybe the latter is just simple precision ?)

All expressions above return approximately (rounding w/ float arithmetic?)

1.17520119364*I

다른 팁

You just need to use a cap I, so in sage

I*I = -1

And

N(sin(I)) = 1.17520119364380*I

At least this works for the online notebook.

These two chapters will provide some good background:

From that, you can get your answer:

ComplexNumber(0,1).sin()
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top