# A total derivative problem

I wanted to test my understanding of multivariable differentiation...so I made up a problem of my own. I wish to find the derivative(total derivative) of the following function:$$f:\Bbb R^2 \to \Bbb R$$ defined by

$$$$f(x,y) = \int_{\sin(x)}^{\cos(y)}g(t)dt$$$$

where $$g:\Bbb R \to \Bbb R$$ is a continuous function. First I must show that $$f$$ is differentiable. Note that

$$$$f(x,y) = \int_{\sin(x)}^{0}g(t)dt + \int_{0}^{\cos(y)}g(t) = \int_{0}^{-\sin(x)}g(t)dt + \int_{0}^{\cos(y)}g(t)$$$$

Now define $$\psi:\Bbb R\to \Bbb R$$ by $$\psi(x) = \int_{0}^{x}g(t)dt$$. Denote the projection of $$\Bbb R^2$$ onto the second coordinate by $$\pi$$. Then both $$\psi$$ and $$\pi$$ and differentiable. Now

$$$$\int_{0}^{\cos(y)}g(t) = \psi(\cos(\pi(x,y)))$$$$

This shows that $$\int_{0}^{\cos(y)}g(t)$$ is differentiable. Similarly $$\int_{0}^{-\sin(x)}g(t)dt$$ is differentiable. Hence $$f$$ is differentiable. Now by chain rule and the fundamental theorem of calculus we have

$$$$\left(\int_{0}^{\cos(y)}g(t)\right)' = \psi'(cos(\pi(x,y)))\times -sin(\pi(x,y))\times \begin{bmatrix} 1\\ 1 \end{bmatrix} = g(\cos(y))\times -sin(y)\times \begin{bmatrix} 1\\ 1 \end{bmatrix} = \begin{bmatrix} -g(\cos(y))sin(y)\\ -g(\cos(y))sin(y) \end{bmatrix}$$$$

a similar computation will show that

$$$$\left(\int_{0}^{\sin(x)} g(t)dt \right)' = \begin{bmatrix} -g(-\sin(x))cos(x)\\ -g(-\sin(x))cos(x) \end{bmatrix}$$$$

Hence the total derivative of $$f$$ will be(hopefully)

$$$$\begin{bmatrix} -g(\cos(y))sin(y)-g(-\sin(x))cos(x)\\ -g(\cos(y))sin(y)-g(-\sin(x))cos(x) \end{bmatrix}$$$$

I kindly request anyone to check my computation and give suggestions for improvements

• Apologies for the confusion, but by "total derivative" of a function $f:(x,y,t) \mapsto f(x(t),y(t))$ do you mean $\frac{\partial f}{\partial t} +\frac{\partial f}{\partial x}\frac{\mathrm{d} x}{\mathrm{d} t} +\frac{\partial f}{\partial y}\frac{\mathrm{d} y}{\mathrm{d} t}$? – K.defaoite May 26 '20 at 18:40
• I think you may not have gotten the size of the total derivative entirely right. Since it's a function from $\mathbb{R}^2 \to \mathbb{R}$, the matrix will be a $2 \times 1$ matrix. – Osama Ghani May 26 '20 at 18:48

I'm not sure what convention's you're using for the matrix; the way I learnt it is that if $$f: \Bbb{R}^n \to \Bbb{R}^m$$ then $$f'(a)$$ is an $$m \times n$$ matrix. In your case, a $$1 \times 2$$ matrix. But yes, your approach for proving differentiability of $$f$$ using $$\psi$$ and the projections along with the chain rule and Fundamental theorem of calculus is absolutely correct, and I believe it's the most efficient way of approaching the question.