# Condense a logistic function around its midpoint [closed]

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?

• 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. Dec 27, 2023 at 16:14
• 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
– Fred
Dec 27, 2023 at 20:08
• 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$ Feb 2 at 15:26
• If this helps people to understand the question, so be it.
– Fred
Feb 3 at 12:49

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$$

• Thank you very much! :-) Now I remember what I once learned at school but forgot long ago :-D
– Fred
Dec 27, 2023 at 23:15
• 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.
– JRN
Dec 28, 2023 at 15:24
• 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.
– Fred
Dec 29, 2023 at 11:17
• @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. Dec 30, 2023 at 4:13
• 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?
– Fred
Jan 2 at 11:45