# How do I calculate this integral (variable change?)

I'm more than rusty with my math and I was wondering if I could find some kind of help on this site. I'm stuck with this equation $$\int_{0}^{t}\ln\frac{p_{1}}{p_{2}}ds$$ or at least I think this is the correct quantity I have to evaluate.

Background. This is from my research into economics, $p_1$ and $p_2$ are the prices of two products and $s$ is how much spending is taking place on product #2 as a percentage of overall spending. I could say more about the economics. For sure, variables $p_1$,$p_2$ and $s$ are each a function of time: $$\int_{0}^{t}\log\frac{p_{1}(t)}{p_{2}(t)}ds(t)$$ or, equivalently, if you prefer $$\int_{0}^{t}\log f(t).ds(t)$$ A crucial point is that the price ratio, i.e. function $f$, may or may not be a function of $s$.

My problem(s). In typical situations, I would try to express the (log) price ratio as a function of $s$, since I have to integrate with respect to $s$. But this doesn't seem feasible. Also my head is spinning from the present setting which mixes antiderivatives and time-series.

Questions.

1. How would calculate the first integral?
2. Any further information I can provide to describe my problem?
3. Maybe, possibly, I need to do some substitutions, as in variable changes or u-substitution?

Any thoughts appreciated.

For your second integral it is confusing (though usually legal) to use $t$ twice, once as the upper limit of integration and once as the dummy variable. It would be more usual to write $$\int_{0}^{t}\log\frac{p_{1}(\tau)}{p_{2}(\tau)}ds(\tau)$$ to show they are distinct. Your integral still indicates that $s$ increases from $0$ to $t$, which makes using $t$ as the upper limit of the integral a little strange. We tend to think of it as time, but you said $s$ was the ratio of two sales. As long as $s$ is an invertible differentiable function of $\tau$ you can use the chain rule to write $ds(\tau)=\frac {ds(\tau)}{d\tau} d\tau$ and have an integral that you can formally do. Whether you can do it analytically depends on the form of $p_1$ and $p_2$
• Thanks. Yes, my notations are not the best! A follow up: you mean that thanks to the chain rule, I can rewrite my integral as $$\int_{0}^{t}log\frac{p_{1}(\tau)}{p_{2}(\tau)}.\frac{ds(\tau)}{d\tau}.d\tau$$. Does this mean I now have to integrate $$[log\frac{p_{1}(\tau)}{p_{2}(\tau)}.\frac{ds(\tau)}{d\tau}]$$ with respect to $\tau$? – frencho Apr 5 '18 at 15:08
• and PS: I have no expression for $p_1$, $p_2$, as they are prices of certain items, and they can be anything. Welcome to economics. – frencho Apr 5 '18 at 15:11
• Yes, that is what you need to do. If you don't have expressions for $p_1,p_2$ but have history data you can do a numeric integration. – Ross Millikan Apr 5 '18 at 15:28