# Implicit form equation solution

Let $\kappa, r_n, x_n, y_n \in \mathbb R$. Solve equation for $A$:

$$\kappa^{-1} \sum_{n=1}^N r_n - \sum_{n=1}^N \big( x_n \cos(Ar_n) + y_n \sin(Ar_n) \big) = 0$$

I would very much appreciate any clues!

@edit:

Ok, so here are the details regarding coefficients. What I'm originally trying to do, is get least-square estimates of $A, \kappa$ parameters, for a spiral wounded on a cone surface. Using cylindrical coordinates we have:

$$S: \begin{cases} x=\kappa^{-1} r \ cos{(Ar)} \\ y= \kappa^{-1} r sin{(Ar)} \\ z=r \end{cases}$$ , where $0\leq r \leq 10$. Say we have a set of points $(x_n,y_n,z_n)$ for which we want to get best fit. Therefore function to minimize has form

$$f(\kappa,A)= \sum_{n} \lbrace{ \left( \kappa^{-1} r_n \ cos(Ar_n) - x_n \right)^2 + \left( \kappa^{-1} r_n \ sin(Ar_n) - y_n \right)^2 + \left( r_n - z_n \right)^2 \rbrace}$$

,where $r_n$ are given. Now system of equations

$$\begin{cases} \frac{\partial f(\kappa,A)}{\partial \kappa} =0 \\ \frac{\partial f(\kappa,A)}{\partial A} =0 \end{cases}$$

yields

$$\begin{cases} g(A) := \sum_{n} \lbrace{ \kappa^{-1}r_n - x_n \ cos(Ar_n) - y_n \ sin(Ar_n) \rbrace} = 0 \\ h(A) : = \sum_{n} \lbrace{ sin(Ar_n)x_n -cos(Ar_n) y_n \rbrace} = 0 \end{cases}$$

I've tried to simulate $g$ function via MATLAB. Firstly I simulated $(x_n,y_n,z_n)_{n=1}^N$ as random points from $S$ with normal 3d noise. Using least-squares I am able to get $\kappa$ estimate.

In simulations I have chosen original parameter $A=200$. Now that's how $g(A)$ looks like Result is interesting - does it mean that in our case there exist a unique solution for $g(A)=0$?

Can You propose fairly accurate numerical method for finding a root of $g$?

Best regards!

• There are flaws in your development. The last term in $f(\kappa,A)$ must have a $+$ sign and the expressions of the derivatives are too simple (f.i., where are the $z$ gone ?)
– user65203
Apr 13, 2016 at 8:43
• I was right to ask for context. This looks more tractable, you are probably looking for the smallest root. (But rework your equations.)
– user65203
Apr 13, 2016 at 8:47
• Of course, there should be '+' sign on the last term (I already corrected this), but it will be cancelled when calculating partial derivatives (last term is free of $\kappa$ and $A$). So I don't see how this affects my calculations. That is also the reason why $z_n$ are not present in my system of equations. The equations are simple because I made certain transformations by the way, after calculating derivatives. Should I present all the steps I made? Apr 13, 2016 at 10:10
• Yep you are right. I cannot pinpoint it, but there's something strange in the problem setting. What are the $r_n$ ?
– user65203
Apr 13, 2016 at 10:22
• So I simulated points $P_n = (x_n,y_n,z_n)$ by generating a sample $(r_n)_{n=1}^N$ from uniform distribution on interval $(0,10)$ (same as the range of $r$ where I defined curve $S$). Then i plugged those values into my $f$ function. Since $r$ is responsible for locating a point on $S$, $r_n$ is a value describing a point $S_n$ on curve $S$, for which distance $d(P_n,S_n)$ is minimal in some sence. Apr 13, 2016 at 10:44

The trigonometric terms generate an aperiodic function of $A$ which ranges in $[-\sum\sqrt{x_n^2+y_n^2},+\sum\sqrt{x_n^2+y_n^2}]$. It can be extremely complicated. 