1
$\begingroup$

Is it possible to construct a differentiable function which behaves as a $\frac{1}{\cos(x)}$ function of x until a threshold (less than $\frac{\pi}{2}$) then is close to or is a constant value? I show what I'm looking for in the figure below. The function I want to create is differentiable and behaves the same as one over cosine at values less than the threshold (the green curved line) but is constant or near constant at x values greater than the threshold (the straight blue line).

enter image description here

  • 0
    Yes. Look in a book on differential topology like Guilleman and Pollack, when they are constructing partitions of unity.2017-01-20
  • 0
    What Charlie said. With the extra detail: you can find a function that is equal to $1/\cos x$ for $x \le\pi / 2$ and equal to $0$ for $x \ge \pi / 2 + a$ for $a$ arbitrarily small that you specify beforehand.2017-01-20

1 Answers 1

2

There is no differentiable function $f:[0,b] \to \mathbb{R}$ such that $b>\pi/2$ and $f(x)=1/\cos(x)$ for all $0continuous function, since such a function would be bounded.

There is something close which is possible, which is that if you give me any $\epsilon>0$, I can construct a function with the following properties:

  • $f$ is differentiable on an interval containing $\pi/2$
  • For $x<\pi/2-\epsilon$, $f(x)=1/\cos(x)$
  • For $x\ge\pi/2$, $f(x)$ is some constant specified in advance

A detailed proof would be quite long, but here is the idea: it relies on the function $\phi(x)=\exp(-1/x^{2})$. It is an exercise to show that $\phi$ is smooth (if we extend it to all of $\mathbb{R}$ by defining $\phi(0)=0$), and all of its derivatives are $0$ at the origin. In particular, $\phi$ is not analytic: the Taylor series for $\phi$ does not converge to $\phi$ anywhere except at $0$.

What does this mean? Well, you can add any multiple of $\phi$ to $f$ and not change its derivatives. In particular, if you define $f(x)=1/\cos(x)$ on $(0,\pi/2-\epsilon)$, say, and then $$f(x+\pi/2 - \epsilon)=\frac{1}{\cos(x+\pi/2 - \epsilon)}+ae^{-\frac{b}{x^{2}}}$$ where $a$ and $b$ are suitably chosen constants that $f(y)=C$ and $f'(y)=0$ for some $y \in (\pi/2 - \epsilon, \pi/2)$, and define, $f(x)=C$ for $x>y$, then the resulting glued function will be differentiable, and will have the properties you desire.

  • 0
    Thanks. How can I determine appropriate a and b coefficients? And why did you add $\frac{\pi}{2}$ to $x-\epsilon$?2017-01-20
  • 0
    Pick your favourite $y$ in that interval, compute $f(y)$ and $f'(y)$, set them equal to $0$ and $C$, and solve the resulting simultaneous equations. The notational thing was just to avoid putting $x-(\pi/2 -\epsilon)$ in the exponential, sorry if it looks weird! Note that that $x$ is clearly not the same as the earlier $x$.2017-01-20
  • 0
    shouldn't f(y) be set equal to $1/cos(y-\epsilon)$, implying that $ae^{\frac{-b}{y^2}}≋0$?2017-01-24
  • 0
    No: for $y > \pi/2 - \epsilon$, $f$ is going to be different from $\frac{1}{\cos(y)}$.2017-01-26