Example of function on R with given property

32 Views Asked by At

I wanted to find example of function with following property: $f(x)=0,\forall x\leq 0$ and $f(x)>0,\forall x>0$
I tried but. I stuck in infinite differentiablilty. I thought some combination of exponential and integration but not succeed. Any help will be appreciated

Edit:

1

There are 1 best solutions below

0
On BEST ANSWER

Consider $$f(x) = \begin{cases} 0, & \text{if $x \le 0$} \\ e^{-\frac{1}{x^2}}, & \text{if $x > 0$} \end{cases}$$

Hope that will work.