Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

One option, and this might be suboptimal, is to replace sin(x) with its taylor series.

Because

sin(x) = x - (1/6)x^3 + (1/120)x^5 - (1/5040)x^7 + (1/362880)x^9 - O(x^11)

we would change

Asin(x) = BC - B*x

into instead

Ax - (A/6)x^3 + (A/120)x^5 - (A/5040)x^7 + (A/362880)x^9 - O(A x^11) = BC - Bx

giving you then

-BC + (A+B)x - (A/6)x^3 + (A/120)x^5 - (A/5040)x^7 + (A/362880)x^9 - O(A x^11) = 0

or if you want a few more terms

-BC + (A+B)x - (A/3!)x^3 + (A/5!)x^5 - (A/7!)x^7 + (A/9!)x^9 - (A/11!)x^11 + (A/13!)x^13 + O(A x^15) = 0

This does reveal that varying C will only affect the answer by a constant.

If A and B were fixed constants, known in advance, then you could use "for" and "find_root" to find a value of x for a long sequence of C values, forming a table of values.

For example:

http://sagecell.sagemath.org/?z=eJxtkEEOgjAQRfck3OEHN61AbCXGaNIFsPcImkZFG6XFWo3eXigukDiLyeT1zUzbp7QkylGgjGgYhEEueBgUXarfu-PtIZ0yGgJpMS0Rg-RxQacvpG01q-TeGavklWS0hdvMCwO88HgxtpceL8f2yuPV2Obcc87HPu-38gxCgHWXr4zFBUrDSn06EpZgzhij6zBAG-6s7mX7FHJJeYdnXe6PGqu0w4Z4hSZDGNWyucOZ6IdWSh921hhHMPgnUorvBKSNStAo0L5r8u37J_fGBxCYaqw=&lang=sage