I am trying to make the following curve to exhibit an exponential decline from a given value to zero. So far, I only managed to make it go from infinite to zero.. Thus I still need to make the curve smoothly increase for smaller values, up to a preset value "top"
Here is the expression in R language:
cu=function(t){
-(c-t)*I/(a-t)*(1+exp((b-t)*I))
}
top=2000 # maximum value for the curve
a=35 # minimum value, at which the curve should take value "top"
b=42 # value to create an inflexion point
c=45 # value to make curve zero
I=3.4 # parameter to make the decrease in values faster
s=curve(cu,from=a,to=c,n=20)
plot(s)
Thanks in advance!
addendum: as suggested, I edited the curve to:
cu=function(t){(-(c-a)*I/(a-t+g))*(1+exp((b-t)*I))}
but then, when using the parameters
top=2000#
a=35#
b=42.5#
c=45#
I=3.4 #
estimating parameter g from top
g=long/(-(c−a)*I*(1+(exp((b−a)*I))))
plotting the curve
curve(cu,from=a,to=c,col="blue",n=10,
ylim=c(0,long+100),
xlim=c(34,50))
It does not stop at 2000
if you introduce a paraneter $g$ into the modified functional form
$$f(t)=\frac{-(c-a)I}{a-t+g}(1+e^{(b-t)I})$$
then estimating $g$ as
$$g=\frac{-(c-a)I(1+e^{(b-a)I})}{2000}$$
gives you $g=-368686801.482604$ for your specified values of $a$,$b$,$c$ and $I$.
Your curve then looks like
and you see the inflexion point at $b=42$ only when it's plotted on a log-scale, because your decay rate is rather large. I tried playing around with a multiplier on the argument of the exponential as well as varying $I$, but it didn't do much.
For a different set of parameters, the curve looks like this: