1

Let's say I consider the function $f$ to be a "template" function, which I have to translate along the $x$-axis so that the integral

$$\int f(x+a)dx = \mathcal{I}.$$

How can I find $a$ if $f$ is not a linear function?

Brian
  • 111

1 Answers1

2

In your case the limits of the integration are unspecified, so I guess that they are some fixed numbers, say $A$ and $B$ and at least one of them is finite: in case you mean the infinite limits, clearly $$ \int_{-\infty}^\infty f(x)\mathrm dx = \int_{-\infty}^\infty f(x+a)\mathrm dx $$ for any $a$. Anyways, let us assume that $f$ is continuous, and define $$ F(a):=\int_A^Bf(x+a)\mathrm dx. $$ Clearly, we have that $$ F'(a) = \frac{\mathrm d}{\mathrm da}\int_{A-a}^{B-a}f(x)\mathrm dx = f(A-a) - f(B-a) \tag{1} $$ and $(1)$ together with $F(0) = \int_A^B f$ uniquely defines $F$. It is obvious that $F$ is continuous and even continuously differentiable, so that it satisfies the intermediate value theorem. Namely, for any $\mathcal I\in (\inf F,\sup F)$ there exists (maybe, not unique) $a(\mathcal I)$ such that $F(a(\mathcal I)) = \mathcal I$. However, since $f$ is not specified, then $F$ as per $(1)$ can be of any shape, and actually looking for $a(\mathcal I)$ is equivalent to looking for zeros of the continuously differntiable function $F - \mathcal I$: $$ F(a(\mathcal I)) - \mathcal I=0. $$ The latter problem clearly does not usually have analytical solutions, in particular when $f$ is a polynomial of order $4$ and higher. The case when $f$ is linear exactly corresponds to the case when $F$ is quadratic: that's why it's easy to find the closed form of $a$ in that case. However, numerical methods are for your service. You can start from here as an example. Note that most of the numerical algorithms require only an approximate knowledge of $F$ (so you don't have to be able to find this integral analytically) and for all the derivatives $F',F''$ etc. you have a closed-from shape from $(1)$.

SBF
  • 36,041