Delta-rational chord: Difference between revisions
| Line 82: | Line 82: | ||
<math> | <math> | ||
\displaystyle {\underset{x,y}{\text{minimize}} \sqrt{(\delta_1 - E_1 | \displaystyle {\underset{x,y}{\text{minimize}} \sqrt{\bigg(\frac{x + \delta_1}{x} - E_1 \bigg)^2 + \bigg(\frac{x+\delta_1 + y}{x} - E_2 x\bigg)^2 + \bigg(\frac{x+\delta_1 + y + \delta_3}{x} - E_3 x\bigg)^2 }}. | ||
</math> | </math> | ||
<!-- | |||
We can set the partial derivatives with respect to ''x'' and ''y'' of the inner expression equal to zero (since the derivative of sqrt() is never 0) and use SymPy to solve the system: | We can set the partial derivatives with respect to ''x'' and ''y'' of the inner expression equal to zero (since the derivative of sqrt() is never 0) and use SymPy to solve the system: | ||
| Line 103: | Line 103: | ||
sympy.nonlinsolve([err_squared_x, err_squared_y], [x, y]) | sympy.nonlinsolve([err_squared_x, err_squared_y], [x, y]) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
--> | |||
We similarly include a free variable to be optimized for every additional +?, after coalescing two consecutive +?'s and omitting the middle note. If two variables are related to each other but not to the integer deltas in the signatures, they have a common variable. | We similarly include a free variable to be optimized for every additional +?, after coalescing two consecutive +?'s and omitting the middle note. If two variables are related to each other but not to the integer deltas in the signatures, they have a common variable. | ||