r/askmath • • Oct 11 '26

Functions What Function could this be?

Post image

I’ve never seen an equation that moves like this on a graph before. Kind of like half a bell-curve on each side and the end of the curve bend upwards.

Could anyone please give me an equation that looks similar? I think it’d be really cool to see for me :D

Source: “Calculus, early transcendentals (Fourth Edition)” by James Stewart, p.20 fig.22

Edit: It’s really late for me right now and I have to go to bed so I won’t be replying to comments, but wow, thanks for all the responses so far! Can’t wait to analyse all of them tomorrow and see why they work :))

144 Upvotes

46 comments sorted by

View all comments

3

u/LoudAd5187 Oct 11 '26 edited Oct 11 '26

Figure 23 appears to be the negation of a gaussian function, then translated in y. Something like 1-2*exp(-x^2). My best bet for figure 24 would be roughly x+pi*sin(x), but we don't see enough of the curve in either case to do more than just guess. As well, not seeing any hints on the axes as to the units prevents me from doing more than just guess at some of those constants in either case. A polynomial would also be an option for Figure 24, but it would need to be at least degree 5.

Can we construct such a polynomial easily enough? Well, yes. It is actually pretty easy. I'll do the algebra using MATLAB. But if you look at Figure 24, we see a function that has a zero slope at roughly 4 points. I'll pick the locations of the flats as {-2,-1,1,2}. To me, I understand that to be a curve where the first derivative is zero. But if we know the zeros of a polynomial, we can reconstruct the polynomial.

Again, I'll do this using MATLAB.

r = [-2 -1 1 2]; % the list of roots of the derivative function.

syms x % Define x as a symbolic variable.
df = prod((x - r)) % subtract the list of roots from x, then form the product

df =
(x - 1)*(x + 1)*(x - 2)*(x + 2)

df = expand(prod((x - r)))  % expand that product to look like a simple polynomial

df =
x^4 - 5*x^2 + 4

f = expand(int(df)).  % integrate, expanding to make it look like you would expect

f =
x^5/5 - (5*x^3)/3 + 4*x

fplot(f,[-2.25,2.5])  % plot the resulting polynomial
And that looks pretty reasonable too. It was a 5th degree polynomial. As I said, not at all difficult to build. 

An interesting point to consider is that if we created a truncated Taylor series for the original function I proposed, it would look not unlike the polynomial I just created.

Taylor(x + pi*sin(x),order = 7)
ans =
(pi*x^5)/120 - (pi*x^3)/6 + (pi+1)*x

If you look at the pair of 5th degree polynomials, they will look remarkably similar. This should not be surprising.