AngouriMath

Navigation

← Back to list of members

TryRewriteInOneFunction​(AngouriMath.​Entity,​AngouriMath.​Entity.​Variable,​AngouriMath.​Entity@)

 Method (no overloads)

Summary

Rewrites an equation that mixes sin(u) and cos(u) into one written
in a single function, by way of cos(u)^2 = 1 - sin(u)^2 or its mirror.

Remarks

Without this the equation reaches the exponential solver, which writes both
functions in terms of e^(i u) -- so cos(a x)^2 + sin(a x) + c = 0,
which is a quadratic in sin(a x), becomes a *quartic* in e^(i a x) and is answered with pages of nested radicals where there are two arcsines.
https://github.com/asc-community/AngouriMath/issues/270
Nothing new is needed to solve what comes out: the replacement machinery in
AnalyticalEquationSolver already reduces a polynomial in
sin(u) to a polynomial in a fresh variable and inverts the arcsine
afterwards, which is why sin(x)^2 + sin(x) = 0 has always answered well.
The mixed form simply never became one.
Only whole even powers are rewritten, and the rewrite is kept only if it removes
the other function entirely. An odd power leaves a square root of a square behind
-- sin(x) + cos(x) is not a polynomial in either function -- so those are
declined here and left to the solvers that already handle them.

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 1953 pages online