I'm having trouble solving this Riemann-Stieltjes integral:

$$\int_{- \pi/4}^{\pi/4} f(x)dg(x),$$ where $$f(x):= \begin{cases} \frac{\sin^4x}{\cos^2x}{} &\text{if }x\ge0, \\{}\\ \frac1{\cos^3x} &\text{if }x<0,\end{cases}$$

and $$g(x)=\begin{cases} \phantom{-} 1+\sin(x) &\text{if }-\pi/4 <x<\pi/4, \\ -1 &\text{otherwise}.\end{cases}$$

I believe the only jump discontinuities are at $-\pi/4$ and $\pi/4$. Which $g=-1$ at both of those points. I'm struggling with the rest. What formula should I be using to compute the integral and what should my answer look like? Thanks for any help!

  • $\begingroup$ Check this theorem. $\endgroup$ May 3, 2013 at 1:08
  • $\begingroup$ Can you elaborate how to solve the last integral in that theorem (related to my problem). I can see why I would use it since both f and g have no common discontinuities. $\endgroup$
    – Drake
    May 6, 2013 at 13:51
  • $\begingroup$ CAS says:$1-{\frac {7\,\sqrt {2}}{12}}+\ln \left( 1+\sqrt {2} \right) $ $\endgroup$ Oct 1, 2018 at 22:14
  • $\begingroup$ If $g(x)=1+\sin x$ across the whole interval of integration, then $dg=\cos(x)dx$. And $f(x)$ changes at $x=0$. So can’t you just break it into two integrals? $\endgroup$ May 16, 2019 at 8:10

3 Answers 3


Let $T = \pi/4$. The first term in the Riemann-Stieltjes sum, $f(\xi_1)(g(x_1) - g(-T))$, does not tend to zero when $x_1 \downarrow -T$ and $\xi_1 \downarrow -T$, and similarly for the last term. The integral is $$I = \int_{-T}^T f(x) dg(x) = \\ \lim_{\epsilon \downarrow 0} \{ f(-T) (g(-T + \epsilon)- g(-T)) + \\ f(T) (g(T)- g(T - \epsilon)) \} + \\ \int_{-T}^T f(x) \cos x \,dx = \\ 2 \operatorname{arctanh}(\sqrt 2 - 1) + \frac {19 \sqrt 2} 6 - 2.$$ It can be verified that $$I = f(T) g(T) - f(-T) g(-T) - \int_{-T}^T g(x) df(x) = \\ f(T) g(T) - f(-T) g(-T) - \\ \lim_{\epsilon \downarrow 0} g(0) (f(\epsilon) - f(-\epsilon)) - \\ \int_{-T}^0 g(x) \left( \frac 1 {\cos^3 x} \right)' dx - \int_0^T g(x) \left( \frac {\sin^4 x} {\cos^2 x} \right)' dx.$$


Since $g$ is differentiable on $-\pi/4 <x<\pi/4$ your integral changes to Riemann integral simply by the following theorem: $$\int_a^bf(x)dg(x)=\int_a^bf(x)g'(x)dx$$ so you will have $\int_{- \pi/4}^{\pi/4} f(x)dg(x)= \int_{- \pi/4}^{\pi/4}\frac{\sin^4x}{\cos^2x}d(1+\sin x)=\int_{- \pi/4}^{\pi/4}\frac{\sin^4x}{\cos^2x}\cos x dx$

  • $\begingroup$ The integral should really be $$\int_{-\pi/4}^{\pi/4} f(x) dg(x) = \int_{-\pi/4}^0 \frac 1{\cos^3 x} d(1+\sin x) + \int_0^{\pi/4} \frac{\sin^4 x}{\cos^2 x} d(1+\sin x)$$ or $$\int_{-\pi/4}^{\pi/4} f(x) dg(x) = \int_{-\pi/4}^0 \frac 1{\cos^3 x} \cos x dx + \int_0^{\pi/4} \frac{\sin^4 x}{\cos^2 x} \cos x dx$$ $\endgroup$ Jan 7, 2017 at 3:50
  • $\begingroup$ Psst... both of you need to take a closer look to what happens at the endpoints. $\endgroup$
    – user361424
    Jun 28, 2017 at 0:55

Since $g$ is differentiable there is no trouble with sum this boils down to Riemann integral of $g'\cdot f$

Namely from here we have $$\color{blue}{\int_a^bf(x)dg(x)=\int_a^bf(x)g'(x)dx}$$ Therefore, $$\int_{-\pi/4}^{\pi/4} f(x) dg(x) = \int_{-\pi/4}^0 \frac 1{\cos^3 x} d(1+\sin x) + \int_0^{\pi/4} \frac{\sin^4 x}{\cos^2 x} d(1+\sin x)\\=\int_{-\pi/4}^0 \frac 1{\cos^2 x} dx + \int_0^{\pi/4} \frac{\sin^4 x}{\cos^2 x} d(\sin x)$$

But $$\int_{-\pi/4}^0 \frac 1{\cos^2 x} dx =\int^{\pi/4}_0 (\tan x)' dx =1$$

and $$\int_0^{\pi/4} \frac{\sin^4 x}{\cos^2 x} d(\sin x) = \int_0^{\pi/4} \frac{\sin^4 x}{1-\sin^2 x} d(\sin x) =\int_0^{\sqrt{2}/2} \frac{t^4 }{1-t^2 } dt\\=\int_0^{\sqrt{2}/2} -t^2+\frac{t^2 }{1-t^2 } dt$$ $$ $$

  • $\begingroup$ The first formula isn't applicable when $g$ has jump discontinuities. $\endgroup$
    – Maxim
    May 28, 2018 at 21:15
  • $\begingroup$ @Maxim It is possible the discontinuities are of first order. $\endgroup$
    – Guy Fsone
    May 30, 2018 at 7:14
  • $\begingroup$ There are zero order discontinuities at the endpoints. See my answer. $\endgroup$
    – Maxim
    May 30, 2018 at 9:42
  • $\begingroup$ @Maxim what do you mean by zero order discontnuity? $\endgroup$
    – Guy Fsone
    May 31, 2018 at 1:52
  • $\begingroup$ I mean that the function itself (the derivative of zero order) is discontinuous. $\endgroup$
    – Maxim
    May 31, 2018 at 9:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .