Show that $f = \frac{\log(1+x^2y^2)}{x^2}$ is a $C^1$ function.

122 Views Asked by At

I've made a proof attempt at the following question but I'm not sure if it's correct. It's a long post, but I'm mainly interested in some broad feedback, is the approach in general correct and is there room for improvement, parcticularly shorter ways to prove it. Thanks!

We look at the function $f\colon \mathbb{R}^2 \to \mathbb{R}$ given by $$ f(x,y) = \begin{cases} \frac{\log(1+x^2y^2)}{x^2} & \textrm{als } x \neq 0, \\ y^2 & \textrm{als } x = 0. \end{cases} $$ I need to show that $f$ is a $C^1$ function (continuously differentiable), and calculate $f'$.

This is my attempt:

Firstly we calculate the partial derivatives $D_1f(x,y), D_2f(x,y)$. For this, we define the functions $g_1, g_2\colon \mathbb{R} \to \mathbb{R}$ as $g_1(t) = f(t,y)$ and $g_2(t) = f(x,t)$. It follows that $$ D_1f(x,y) = g'_1(x) = \lim_{h \to 0} \frac{g_1(x+h)-g_1(x)}{h} = \lim_{h \to 0} \frac{f(x+h,y) - f(x,y)}{h} $$ and $$ D_2f(x,y) = g'_2(y) = \lim_{h \to 0} \frac{g_2(y+h)-g_2(y)}{h} = \lim_{h \to 0} \frac{f(x,y+h) - f(x,y)}{h} $$ Firstly we assume that $x \neq 0$. Then we can use the standard method of differentiation to find the partial derivatives, using the quotient rule. We compute: \begin{align*} D_1f(x,y) = g'_1(x) & = \frac{\frac{2xy^2}{1+x^2y^2} \cdot x^2 - \log(1+x^2y^2) \cdot 2x}{x^4} \\ & = \frac{\frac{2x^2y^2}{1+x^2y^2} - 2\log(1+x^2y^2)}{x^3} \\ & = \frac{2(x^2y^2-(1+x^2y^2)\log(1+x^2y^2)}{x^3(1+x^2y^2)}, \end{align*} and \begin{align*} D_2f(x,y) = g'_2(y) & = \frac{\frac{2x^2y}{1+x^2y^2} \cdot x^2}{x^4} = \frac{2y}{1+x^2y^2}. \end{align*} Now suppose $x = 0$. Notice that $D_2f(x,y)$ is defined for $x = 0$, and is equal to $2y$. This corresponds with the fact that $$ D_2(0,y) = g_2'(y) = \frac{\partial f(0,y)}{\partial y} = \frac{\partial y^2}{\partial y} = 2y. $$ We can also calculate this straight from the definition easily: \begin{align*} D_2(0,y) & = \lim_{h \to 0} \frac{f(0,y+h)-f(0,y)}{h} \\ & = \lim_{h \to 0} \frac{(y+h)^2 - y^2}{h} = \lim_{h \to 0} \frac{y^2 + 2yh + h^2 - y^2}{h} \\ & = \lim_{h \to 0} \frac{2yh + h^2}{h} = \lim_{h \to 0} 2y + h = 2y. \end{align*}

Finally, we have to calculate $D_1(0,y)$ from the definition because it is undefined in our earlier calculation, and the limit involves both, terms $f(x,y)$ with $x = 0$ and with $x \neq 0$. We use here the expansion $\log(1+t^2y^2) = t^2y^2 - \frac{t^4y^4}{2} + O(|t^6y^6|)$. We compute: \begin{align*} D_1(0,y) & = \lim_{t \to 0} \frac{f(t,y) - f(0,y)}{t} \\ & = \lim_{t \to 0} \frac{\frac{\log(1+t^2y^2)}{t^2} - y^2}{t} \\ & = \lim_{t \to 0} \frac{\log(1+t^2y^2) - t^2y^2}{t^3} \\ & = \lim_{t \to 0} \frac{t^2y^2 - \frac{t^4y^4}{2} + O(|t^6y^6|) - t^2y^2}{t^3} \\ & = \lim_{t \to 0} \frac{-\frac{t^4y^4}{2} + O(|t^6y^6|)}{t^3} = \lim_{t \to 0} \frac{-ty^4}{2} + \lim_{t \to 0} \frac{O(|t^6y^6|)}{t^3} = 0. \end{align*}

We now use the theorem that $f$ is $C^1$ (continuously differentiable) iff all of its partial derivatives exist and are continuous. Notice that for $x \neq 0$, they are continuous, because they are quotients of continuous terms. We prove that they are continuous in $(x,y)$ with $x=0$ as well. So we need to show that $\lim_{(x,y') \to (0,y)} D_1f(x,y') = D_1f(0,y) = 0$. We use here the expansion $\log(1+x^2y^2) = x^2y^2 + O(|x^4y^4|)$. We compute: \begin{align*} \lim_{(x,y') \to (0,y)} D_1f(x,y') & = \lim_{x \to 0} \frac{\frac{2x^2y^2}{1+x^2y^2} - 2\log(1+x^2y^2)}{x^3} \\ & = \lim_{x \to 0} \frac{\frac{2x^2y^2}{1+x^2y^2} - 2(x^2y^2 + O(|x^4y^4|))}{x^3} \\ & = \lim_{x \to 0} \frac{\frac{2x^2y^2 - 2x^2y^2(1+x^2y^2)}{1+x^2y^2} + O(|x^4y^4|))}{x^3} \\ & = \lim_{x \to 0} \frac{\frac{- 2x^4y^4}{1+x^2y^2}}{x^3} + \lim_{x \to 0} \frac{O(|x^4y^4|)}{x^3} \\ & = \lim_{x \to 0} \frac{- 2xy^4}{1+x^2y^2} = \lim_{x \to 0} \frac{-2y^4}{\frac{1}{x}+xy^2} = 0. \end{align*} For $D_2$ we have \begin{align*} \lim_{(x,y') \to (0,y)} D_2f(x,y') & = \lim_{x \to 0} \frac{2y}{1+x^2y^2} = 2y = D_2f(0,y). \end{align*} Thus we conclude that $f$ is $C^1$ since both partial derivatives are continuous on $\mathbb{R}^2$. The derivative is then given by $$ f'(x,y) = \begin{cases} \begin{bmatrix} \frac{2(x^2y^2-(1+x^2y^2)\log(1+x^2y^2)}{x^3(1+x^2y^2)} & \frac{2y}{1+x^2y^2} \end{bmatrix} & \textrm{if } x \neq 0, \\ \\ \begin{bmatrix} 0 & 2y \end{bmatrix} & \textrm{if } x = 0. \end{cases} $$