I have a function

$$ f(x) = {1 \over 1 + e^{-k(x-0.5)}} $$

that plots a logistic curve that is symmetric around the point $0.5 / 0.5$.

$k$ defines the steepness of the curve.

I would now like to add another parameter (let's call it $c$) that stretches/condenses the curve on the y-axis while it stays symmetric around its midpoint $0.5 / 0.5$.

How/where would I add $c$ to this function?

  • 2
    $\begingroup$ That's such an interesting question! But it's a math question, not a math education question. Please post it on math.stackexchange.com, not here. $\endgroup$
    – Sue VanHattum
    Dec 27, 2023 at 16:14
  • 1
    $\begingroup$ Is there ANY stackexchange forum where normal math users can post their math questions? Everyone feels too posh to accept this question, but at least I got the answer here. Thank you @justin-skycak <3 $\endgroup$
    – Fred
    Dec 27, 2023 at 20:08
  • 1
    $\begingroup$ Rather than 0.5 / 0.5, that should be typeset as $0.5/0.5.$ Similarly $k$ and $c.$ I.e, with dollar signs. $\qquad$ $\endgroup$ Feb 2 at 15:26
  • $\begingroup$ If this helps people to understand the question, so be it. $\endgroup$
    – Fred
    Feb 3 at 12:49

1 Answer 1


Shift it down so it's symmetric to $y=0,$ then stretch it, then shift it back up so that it's symmetric to $y=0.5$ again.

$$f(x) = c \left( \dfrac{1}{1 + e^{-k(x-0.5)}} - 0.5 \right) + 0.5$$

  • 1
    $\begingroup$ Thank you very much! :-) Now I remember what I once learned at school but forgot long ago :-D $\endgroup$
    – Fred
    Dec 27, 2023 at 23:15
  • 6
    $\begingroup$ I don't think it's a good idea to answer off-topic questions. I think you should ask the OP to post it at an appropriate site, then you answer it there. $\endgroup$
    – JRN
    Dec 28, 2023 at 15:24
  • 1
    $\begingroup$ Toooo late 🤷 I don't think that all the gatekeeping on SE sites does well to the communities. You could at least tell me which of the sites would have been "right". Because I tried all that are related to math and here I got the answer. So it appears to be the right one. $\endgroup$
    – Fred
    Dec 29, 2023 at 11:17
  • 2
    $\begingroup$ @Fred I don't think that this question, as currently phrased, is a very good question for any SE site. It isn't about Math Education, so it doesn't belog here; and it is lacking context, so it wouldn't be appropriate on Math. I can't think of any other site on the SE network where it would fit. It might be more appropriate for another site (like reddit) or for the SE chat system. $\endgroup$
    – Xander Henderson
    Dec 30, 2023 at 4:13
  • $\begingroup$ How does the context help to understand the question? It's about stretching a function. It could be just for intellectual purposes without any more thoughts behind it. So how would you phrase it? $\endgroup$
    – Fred
    Jan 2 at 11:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.