0

To solve the integral $\int f\left( g(x) \right) dx$ for $f,g:\mathbb{R}\rightarrow\mathbb{R}$ we can use a straightforward substitution (1, 2).

Is there any general way to solve the following integral, for $f:\mathbb{R}^n\rightarrow\mathbb{R}$, $g_i:\mathbb{R}\rightarrow\mathbb{R}$? $$ \int f\left( g_1(x), ..., g_n(x) \right) dx $$

dkv
  • 445
  • I question your opening line. Unless it is of the form $\int f(g(x))g'(x)dx$, a substitution is unlikely to work. :) – Ted Shifrin Feb 07 '23 at 18:35
  • @TedShifrin The two posts I linked suggest that we can use $g(x) = u$ and $dx = (g^{-1})'(u)du$ in the case that there is no $g'(x)$ in the integrand. I wonder if there is a generalization of this. – dkv Feb 07 '23 at 18:40
  • But you're unlikely to get an integral you can "do," in general. Even for an integral like $\int \sin^3x,dx$, which I can do by other means, how will you do that with $f(u)=u^3$? – Ted Shifrin Feb 07 '23 at 18:41
  • Perhaps I'll get lucky. Specifically, I'm interested in the case where $f(z_1, ... z_n) = \frac{e^{z_k}}{\sum_j e^{z_j}}$ and $g_i(x) = a_ix + b_i$, but generally this is still a potentially interesting generalization of the result for real-valued functions. – dkv Feb 07 '23 at 18:57
  • Linear changes of variables are not an issue. But in multivariable, the region of integration will be a big deal. I think you should focus on your specific question. You will need a preliminary change of variables, before you worry about your $g_i$, to deal with $\iint_D \frac{e^y}{e^x+e^y},dx,dy$. What is $D$? – Ted Shifrin Feb 07 '23 at 19:10
  • Sorry, I think I'm confused. Since the variable of integration is $x$, wouldn't the original problem be effectively a line integral, rather than an integral over a region? Why are we worried about the region of integration? Furthermore, I am wondering about the indefinite integral -- is it still valid to ask the question without specifying the bounds? – dkv Feb 07 '23 at 20:00
  • 1
    My fault. The answer and I were both visualizing a multidimensional integral. Using $t$ as the one-dimensional parameter, to integrate we’ll need (up to constant factor) $f(\vec g(t)) = \nabla \phi(\vec g(t)\cdot \vec g’(t)$ for some function $\phi$ on $\Bbb R^n$. – Ted Shifrin Feb 07 '23 at 20:16

1 Answers1

1

I will respond to your specific question that we've been discussing in the comments. I want your integrand to be of the form $\nabla\phi(\vec g(t))\cdot \vec g'(t)$. We will get close, but will not get what you want. You have $\vec g(t) = t\vec a + \vec b$, so $\vec g' = \vec a$. With $F(x_1,\dots,x_n) = \dfrac{e^{x_k}}{e^{x_1} + \dots + e^{x_n}}$, we try $\phi(x_1,\dots,x_n) = \ln(e^{x_1} + \dots +e^{x_n})$. Then $$\nabla\phi = \frac1{e^{x_1} + \dots + e^{x_n}}(e^{x_1},e^{x_2},\dots,e^{x_n}).$$ The only way to isolate to a single $e^{x_k}$ is to have a function $\vec g(t)$ whose only non-constant component is the $k$th. The best I can do for you is to get $$\int \frac{\sum a_ie^{a_it+b_i}}{\sum e^{a_it+b_i}}dt = \ln\left(\sum e^{a_it+b_i}\right).$$ Of course, we didn't need any multivariable calculus to get this.

Ted Shifrin
  • 115,160