Numerical method for finding a parameter inside an integral

191 Views Asked by At

I have a set of data, basically with the information of f(x) as a function of x, and x itself. I know from the theory of the problem that I'm working on the format of f(x), which is given as the expression below:

equation 1

Essentially, I want to use this set of data to find the parameters a and b but I don't know any numetical methods that could be used to this task since the x itself is in one of the limits of integration.

Could any one help me with that? Can be anything a name of a method, a clue. Literally anything.

I would also like to point out that I posted this question in stack overflow looking for a pratical answer and in case of need, in this page there is some links with the data set that I'm working on. However, besides any answer I can get from stack overflow I would like to know the numerical methods that I could use to solve this problem.

Thanks in advance guys!

EDIT 1: Well guys, turns out I was trying to solve my problem in pieces. The problem in all its glory is actually given by the following integral:

equation_2

I'm gratefull for the answer given below for the first case! I did learn with that. But I could not generalize it for the integral above. I actually think that this one can not be solved analitically. So I think that my biggest question remains:

Could any one help me with a way for finding the parameters inside the integral? Can be anything a name of a method, a clue. Literally anything. And for what matters all the parameters are supposed to be bigger than zero, and b, c and d can be correlated.

EDIT 2: I also know that there is a relationship among b, c and d of the following kind: b+c+d = constant, and MAYBE, MAYBE this constant is equal to one.

Also, I would like a way to first find two parameters: a and one inside the integral. Actually, to me it doesn't matter which one, I would be happy in any case. But if I could, I would say that preferably I would like to find d. And in case of this approach not be possible, I would like to have a method to:

  • Find the parameter a alone, supposing that I do know b, c, and d.
  • Find one of the parameters inside the integral, preferably d.
2

There are 2 best solutions below

1
On BEST ANSWER

Changing a little your notations, you have $$f(x)=\int_0^x \frac{dt}{a \sqrt{b (t+1)^3+c (t+1)^4}}$$ The antiderivative does not make any problem and we have $$f(x)=-\frac{2 \sqrt{(x+1)^3 (b+c(x+1))}}{a b (x+1)^2}+\frac{2 \sqrt{b+c}}{a b}$$ which could simplify if $(x+1)>0$. Assuming that this is the case $$f(x)=-\frac{2 \sqrt{(x+1) (b+c(x+1))}}{a b (x+1)}+\frac{2 \sqrt{b+c}}{a b}$$

Now, I suppose that you have $n$ data points $(x_i,f(x_i))$ and you want to identify the parameters to get the best match. This is nonlinear regression.

To make the model better conditioned, I should define $d=ab$ to make $$f(x)=-\frac{2 \sqrt{(x+1) (b+c(x+1))}}{d (x+1)}+\frac{2 \sqrt{b+c}}{d}$$

As usual, the problem is to find "reasonable" starting guesses for $(b,c,d)$ before starting the nonlinear regression.

Assuming that you have data close to $x=0$, you could use the fact that $$f'(0)=\frac{b}{d \sqrt{b+c}}$$ which will give you an expression of an estimate of $d$ as a function of $b$ and $c$.

Similarly, assuming that you have data for large $x$, the horizontal asymptote is given by $$f(\infty)=\frac{2 \left(\sqrt{b+c}-\sqrt{c}\right)}{d}$$ which now gives an estimate of $b$. To summarize, our estimates would be $$b=c\frac{4f'(0) (f(\infty)-f'(0))}{(f(\infty)-2 f'(0))^2}\qquad \text{and} \qquad d=\sqrt{c}\frac{4 (f'(0)-f(\infty))}{f(\infty) (f(\infty)-2 f'(0))}$$ So, we have now $b(c)$ and $a(c)$.

Now, consider $$SSQ(c)=\sum_{i=1}^n \left(f(x_i)-\frac{2 \sqrt{(x_i+1) (b(c)+c(x_i+1))}}{d(c) (x_i+1)}+\frac{2 \sqrt{b(c)+c}}{d(c)} \right)^2$$

Try a few values of $c$ until you see more of less a minimum of $SSQ(c)$. For this $c$, recompute $b$ and $d$ according to the approximative formulae and, at this point, you have all elements to start a nonlinear regression.

1
On

Concerning the new integral $$I=\int \frac{dt}{a \sqrt{b (t+1)^3+c (t+1)^4+d}}$$ it is possible to compute it analytically. Write $$b (t+1)^3+c (t+1)^4+d=c t^4+ (b+4 c)t^3+ (3 b+6 c)t^2+ (3 b+4 c)t+(b+c+d)$$ that is to say $$b (t+1)^3+c (t+1)^4+d=c \prod_{i=1}^4 (t-r_i)$$ where the $r_i$'s are related to $(b,c,d)$ using Vieta's formulae. So, we face $$I=\frac 1{a \sqrt c} \int \frac{dt}{\sqrt{(t-r_1) (t-r_2) (t-r_3) (t-r_4)}}$$

Have a look here for the result (at the bottom of the page).

Since, more than likely, the $r_i$' will be complex, it could be better to write $$b (t+1)^3+c (t+1)^4+d=c(t^2+At+B)(t^2+Ct+D)$$ to face $$I=\frac 1{a \sqrt c} \int \frac{dt}{\sqrt{(t^2+At+B)(t^2+Ct+D)}}$$ where $(A,B,C,D)$ will be real.

Have a look here for the result.

Now, I suppose that it would be good to think about an optimization problem with a few equality constraints.