I'am new to Maxima and would like to use it for Denavit-Hartenberg matrices (consists of a lot of cos and sin terms). The problem is, that maxima does not simplify the following expression:
ex: x*cos(pi);
I expect, that Maxima simplifies ex
to -x
. How can this been done? (ratsimp(ex)
and trigsimp(ex)
have no effects)
The value of cos pi can be calculated by constructing an angle of π radians with the x-axis, and then finding the coordinates of the corresponding point (-1, 0) on the unit circle. The value of cos pi is equal to the x-coordinate (-1). ∴ cos pi = -1.
In trigonometry, cosine is an angle complementary to a sine angle. It is defined as a ratio of adjacent (base) sides to the hypotenuse. As we know that, cos(π) = cos 180º cos 180º lies in the second quadrant where cos has a negative value. Therefore, cos (π) or cos 180º = -1.
The value of cos pi/3 can be calculated by constructing an angle of π/3 radians with the x-axis, and then finding the coordinates of the corresponding point (0.5, 0.866) on the unit circle. The value of cos pi/3 is equal to the x-coordinate (0.5). ∴ cos pi/3 = 0.5.
In Maxima's dialect, the correct name of the constant is %pi
. With it, it should simplify correctly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With