1
$\begingroup$

Let's say I have a piecewise function that's continuous in an interval [1,7]:

$f(x) = \left\{ \begin{array}{lr} -5x + 6 & : x \in [1,2)\\ -4x + 14 & : x \in [2,3)\\ -0.25x + 2.75 & : x \in [3,7] \end{array} \right.$

piecewise graph

  1. How would I get a discretization of that function that consists of 10 equidistant points? [I'm interested in method(s), not calculations for that example.]

  2. More generally, how would I discretize functions with any number of parameters to get n equidistant points (e.g., to represent the surface of a sphere with 100 equidistant points)?

  • 3
    Could you rephrase? First, *interval* refers to $\mathbb{R}$ and not $\mathbb{R}^2$. Second, it seems your question has nothing to do with functions. Third, the inclusion of an image in your post is unwise if the image carries no information. Fourth, since $\mathbb{R}^n$ is unbounded, to choose a finite number of points in this space could need some further explanations.2011-03-25
  • 0
    Sorry, I tried to be more clear. About the image: it's there to support the example - images usually shouldn't hold information that's not already part of the question.2011-03-25
  • 1
    Thanks for the clarification. It seems the usual discretization of an interval $[a,b]$ by the $n+1$ equidistant points $a+(b-a)(k/n)$ is not what you are after, why? Do you intend to keep track of the points used to define piecewisely your function, in your example $2$ and $3$? (About the image: if you ask me, in this case it carries no useful information whatsoever and could be omitted.)2011-03-25
  • 0
    I'm sorry, I lost my cookie and can't add a comment above. I also cannot request a user merge on Meta because I only got 1 rep point. I'm also not allowed to chat, so I'm forced to make this an answer: @DidierPiau: I'll just write what I'm looking for instead of what I think I need to do: In the example above I'm looking for a set of points $\{(x_i, y_i)\}$ for $i = 1, ..., 10$ with $f(x_i) = y_i$, so that the (Eucledian) distance between $(x_j, y_j)$ and $(x_{j+1}, y_{j+1})$ is some $\delta$ (given that $x_j < x_{j+1}$ for $j = 1,...,9$).2011-03-25
  • 0
    I see. Looks kind of weird. Any motivation?2011-03-25
  • 0
    Your accounts have been merged.2011-03-25
  • 0
    @QiaochuYuan Thanks a lot! @DidierPiau The motivation is simply to get a homogeneous approximation of the (piecewise linear) curve or surface.2011-03-26

2 Answers 2