Am trying to solve some differentials from a paper called "Euler arc splines for curve completion" ( as I'm trying to program up the algorithm that they describe. I'll try to keep the problem in this post, but shout if I've missed anything.

My issue is when trying to calculate the partial differentials: $\displaystyle \frac{\partial \delta_k}{\partial s}$ and $\displaystyle \frac{\partial \delta_k}{\partial \eta}$ where $\displaystyle \eta = \kappa_1 s$ has been used as a substitution fro the purpose of solving the algorithm.

The equation to differentiate is:

$\displaystyle \delta_k = - \frac{\lambda_1 V_k^x + \lambda_2 V_k^y}{2}$

where (prepare for a long list!):

$\displaystyle \lambda_1 = \frac{2 (P_A^x + P_B^x + s \sum_{j=1}^{n}V_j^x) \sum_{j=1}^{n}(V_j^y)^2 - 2 (P_A^y + P_B^y + s \sum_{j=1}^{n}V_j^y) \sum_{j=1}^{n}(V_j^y V_j^x) }{ \sum_{j=1}^{n}(V_j^x)^2 \sum_{j=1}^{n}(V_j^y)^2 -(\sum_{j=1}^{n}(V_j^y V_j^x))^2}$

$\displaystyle \lambda_2 = \frac{2 (P_A^y + P_B^y + s \sum_{j=1}^{n}V_j^y) \sum_{j=1}^{n}(V_j^x)^2 - 2 (P_A^x + P_B^x + s \sum_{j=1}^{n}V_j^x) \sum_{j=1}^{n}(V_j^x V_j^y) }{ \sum_{j=1}^{n}(V_j^x)^2 \sum_{j=1}^{n}(V_j^y)^2 -(\sum_{j=1}^{n}(V_j^x V_j^y))^2}$

$\displaystyle V_j^x = \frac{2 sin(\Delta \theta_j) }{\Delta \theta_j} cos(\theta_A + \psi_j)$

$\displaystyle V_j^y = \frac{2 sin(\Delta \theta_j) }{\Delta \theta_j} sin(\theta_A + \psi_j)$

$\displaystyle \psi_j = \frac{\theta_(j-1) + \theta_j}{2} - \theta_0$


$\displaystyle \theta_i = \theta_0 + i \kappa_1 s + \frac{(i - 1) i}{2} s^2 \alpha$

Where I get particularly stuck is how to get the differentials with respect to $\displaystyle \eta$ given that it is a function of s. Am I overcomplicating it? I'm just not sure how to begin even typing this kind of problem into something like SageMath to work it out.

I'm guessing by back-substituting all of the equations, I can get $\displaystyle \delta_k$ in terms of s and $\displaystyle \kappa_1 s$ but then when differentiating, both seem to involve s, so I'm not sure what to do to terms that will include s but not $\displaystyle \kappa_1 $ .

Not expecting anyone to do the problem for me, but could anyone help me just crack this step, as I've grasped all the rest of the maths in this paper!