1

Is it possible to approximate the step function?

f(x)=\begin{cases} 0 \quad\text{ if }x\le 0\\ 1\quad \text{otherwise} \end{cases}

I want to implement it by polynomial approximation.

mallea
  • 829
  • Do you want to approximate it on the whole line? Or a subset of the line? – Umberto P. Mar 21 '19 at 18:32
  • I'm considering the approximation for the whole line. It would be appreciated if you know subset version of it. – mallea Mar 21 '19 at 18:43
  • You cannot approximate a bounded function on the whole line with a polynomial, as a polynomial has the form $p(x)=a_nx^n+\cdots$, and will go to $\pm\infty$ for $x\rightarrow\infty$. – Alex R. Mar 21 '19 at 18:46
  • @AlexR. Thank you for your response!! Ok, then what about fixing the domain? Say, $-r \leq x \leq r$ for some integer $r$. – mallea Mar 21 '19 at 18:57
  • On a bounded domain, you can uniformly approximate any continuous function with polynomials to whatever accuracy you like. Of course, your function is not continuous at $0$, but it is the limit of a sequence of continuous functions (ones that rise linearly from $0$ up to $1$, for ever inceasing slopes). And thus you can approximate the function with sequence, and the sequence with polynomials. The convergence of the polynomials to your function will not be uniform at $0$, but it will converge. – Paul Sinclair Mar 22 '19 at 02:35

0 Answers0