# How to obtain and graph a function that first grows exponentially and then decays exponentially?

I would like to know what the equation of a curve is if it grows exponentially (let's say it doubles each time). This would be:

$f(x)=2^x$

But then I would like the line to exponentially decay (let it half each time once it reaches let's say 7) with an asymptote of 10.

How could I write this equation? I am only a sophomore in high school right now taking Pre-IB Algebra II by the way.

• wolframalpha.com/input/?i=x%5E2 – Belgi Dec 4 '14 at 20:57
• graphing can be done by $(x,f(x))$. Doubling every time would be $2^x$ – tp1 Dec 4 '14 at 20:57
• @tp1 oh yeah my mistake! Thanks for pointing it out btw – zzirrgrizz Dec 4 '14 at 20:59
• Not quite what you're expecting, but what about $7\cdot2^{-(x-3)^2}$ ? – Lucian Dec 4 '14 at 22:07

When $x \leq 7$, your function would be $f(x)$ = $2^x$
When $x > 7$, your function would be $f(x)$ = ${0.5}^x + 10$.
• Sorry btw, I fixed that $x^2$ mistake! I must have been typing too fast – zzirrgrizz Dec 4 '14 at 21:01
• @zzirrgrizz $f(x) = 2^{7-|x-7|}$. – user147263 Dec 4 '14 at 21:17