# Writing a function as a function of another function

## Homework Statement

Let $\phi$ be defined as follows:
$\phi(t)=\frac{sint}{t}$ if $t \neq 0$
$\phi(t)=1$ if $t = 0$
prove it's derivable on $\mathbb{R}$
now let f be:
$f(x,y)=\frac{cosx-cosy}{x-y}$ if $x \neq y$
$f(x,y)=-sinx$ in any other case
express f as a function of $\phi$ and show f is differentiable in $\mathbb{R}^2$

## The Attempt at a Solution

i had no problems in showing $\phi$ is derivable, but i have some problems in the second part.
i thought to do a composition of functions:

$f(\phi(t),y)=\frac{cos*(\frac{sint}{t})-cosy}{sint-y}$ if $sin(t) \neq y$
$f(\phi(t),y)=-sin*sint$ in any other case
which would clearly be differentiable.
still i'm not sure this is the right way of reasoning.
am i wrong?

Related Calculus and Beyond Homework Help News on Phys.org
haruspex
Homework Helper
Gold Member
Your attempted solution doesn't make much sense. You need to show f is differentiable wrt (x,y). How do you reason that it is 'clearly differentiable'?
I suggest instead doing a change of co-ordinates, including t = x-y. That makes the denominator for f look like that for ϕ.

let me see if i've understood. i should rewrite:

$f(t+y, x-t)=\frac{cos(t+y)-cos(x-t)}{t}$ if $t \neq 0$
$f(t+y, x-t)=-sin(t+y)$ if $t=0$ $\Rightarrow$ $f(t+y, x-t)=-siny$
and then study the differentiability for t=0, which is the only "critical point", as sin and cos are differentiable on all R^2??

haruspex
Homework Helper
Gold Member
$f(t+y, x-t)=\frac{cos(t+y)-cos(x-t)}{t}$
I don't understand how you got that.
What I meant was more like t = x-y, u = x+y. Replace all x and y with t and u.

lurflurf
Homework Helper
hint:recall from trigonometry that
$$\frac{\cos(x)-\cos(y)}{x-y}=-\sin \left( \frac{x+y}{2} \right) \frac{ \sin \left( \frac{x-y}{2} \right) }{\frac{x-y}{2}}$$

like:

x+y=2u
x-y=2t
and using the formula lurflurf suggested:
$f(t,u)=-sinu \frac{sint}{t}$ if $(t,u) \neq (0,1)$ $\rightarrow$ $f(t,u)=-sinu*\phi(t)$
?

i'm afraid i don't really understand the logic and the text of the problem, i'm just going for random attempts.
could you please make it more clear to me? maybe with an example of another similar exercise.. we weren't shown how to solve this kind of problems in class :/

haruspex
Homework Helper
Gold Member
like:

x+y=2u
x-y=2t
and using the formula lurflurf suggested:
$f(t,u)=-sinu \frac{sint}{t}$ if $(t,u) \neq (0,1)$ $\rightarrow$ $f(t,u)=-sinu*\phi(t)$
?
That's the idea, except the condition should just be t ≠ 0 (corresponding to x ≠ y).
You already know ϕ(t) and sin(u) are continuous as functions of one variable. A function of one variable can be trivially extended to a function of two, e.g. g(t, u) = sin(u), and that would obviously be continuous. So f is the product of two continuous functions. I guess something needs to be said about the change of co-ordinates also being continuous.

ok, i've tried to complete it:

$x+y=2u ; x-y=2t$ $\Rightarrow$
$f(u,t)=-sinu*\phi(t)$ if $t \neq 0$
$f(u,t)=-sin(u)$ if $t=0$
$\lim_{t \to 0} f(u,t)=-sin(u)$ which equals f(u,t) if t=0.
Thus the function is continuous for t=0.
Also, it is overall differentiable, because it is a composition of derivable functions.

thanks again :)

lurflurf
Homework Helper
The point of introducing phi was to remove the piecewise definition

$$\mathrm{f}(u,t)=-\sin(u) \, \phi (t)$$

now to prove f is differentiable you probably have some rules you can use like the sum, product and composition of differentiable functions are differentiable.

haruspex