Let's take the cosine formula c²=a²+b²-(2ab)cos(γ).
Ah, you want to challenge me. ;-) No, honestly, I am grateful that you
pose such questions.
I want to
substitute a with (k+l)/2 and b with (l-k)/2 to get
c²=(k²+l²+(k²-l²)cos(γ))/2. Then using the distributive property and
factoring out k and l I want to get c²=(k²(1+cos(γ))+l²(1-cos(γ)))/2.
How can I do this elementary algebra in FriCAS?
(323) -> eq := c^2 = a^2 + b^2 -(2*a*b)*cos(gamma)
2 2 2
(323) c = - 2 a b cos(gamma) + b + a
Type: Equation(Expression(Integer))
(324) -> map(x +-> subst(x,[a=(l+k)/2, b=(l-k)/2]), eq)
2 2 2 2
2 (- l + k )cos(gamma) + l + k
(324) c = -------------------------------
2
Type: Equation(Expression(Integer))
Is that what you want?
Ralf
--
You received this message because you are subscribed to the Google Groups "FriCAS -
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/3e0c81f0-7f11-af6c-c5e6-1be93c47198f%40hemmecke.org.