[求助]mathematica的取实部
弱问:取一个复数函数的实部时,怎么定义函数其中的某些量是实数呢?<BR>如f=exp(i*a),a是实数,然后求re(f),但是结果总是把a当复数处理的,怎么办呢?回复:(yuanyuan)[求助]mathematica的取实部
AllTwo = {Exp, Conjugate]};<BR>RealPart = (ComplexExpand]] + ComplexExpand]])/2;<BR>ImaginPart = (ComplexExpand]] - ComplexExpand]])/2/I;<BR>Print["RealPart=", RealPart, ";ImaginPart=", ImaginPart]<P>Out= RealPart="Cos;ImaginPart=Sin</P>
页:
[1]