I am using an arc length integral $\int_{t_0}^x \sqrt{(|ds|^2)} dt$ to solve for the $x$ that would give me a specific arc length. Assume that I know $t_0$, etc. and the only unknown is $x$. That is, I am solving for $x$ in
$$\int_{t_0}^x dt \sqrt{(|ds|^2)} = k$$
The particular integrand I am using doesn't seem to have a closed-form solution. So, I would like to approximate it using a quadrature rule (in this case, a 5-point Gauss-Legendre quadrature). That gives me an algebraic expression of the form
$$ k \approx \frac{x-t_0}{2}\sum_{i=1}^{n} w_i \sqrt{f(\xi_i\frac{x-t_0}{2}+\frac{t_0+x}{2})} $$
It is not immediately apparent how I would analytically solve for $x$, so instead I would like to use a root-finding algorithm such as the Newton-Raphson method.
My questions are:
- Does this approach even make sense?
- With the Newton-Raphson method, applying a difference of $\frac{f(x)}{f^{'}(x)}$ - what does it even mean to take the derivative of an approximation of an integral? Does that matter here?
Let us make the problem more general.
You need to find the zero of function $$f(x)=\int_{t_0}^x g(t)\, dt-k$$ and you do not have the antiderivative of $g(t)$; so the integral will be computed by some numerical method of your choice. Knowing a guess $x_0$ of the solution you will generate the first iterate using $$x_1=x_0-\frac{f(x_0)}{f'(x_0)}$$ Using the fundamental theorem of calculus, this gives for Newton iterates $$x_{n+1}=x_n-\frac{f(x_n)}{g(x_n)}=x_n-\frac{\int_{t_0}^{x_n} g(t)\, dt-k}{g(x_n)}$$ and, at each step, you will compute $\int_{t_0}^{x_n} g(t)\, dt$.
For illustration purposes, let us consider $g(t)=\frac{e^{\sqrt{t}}}{t^{\pi }+1}$, $t_0=e$ and $k=4.567$ and we shall use $x_0=150$.
This will give as successive iterates $$\{150.000,233.345,208.362,199.954,199.18,199.174\}$$
You could even use higher order methods such as Halley or Householder to reduce the number of required interations.