Dissecting a Wild Function: Derivative + Infinite Series + Infinite Product

December 14, 2025

Problem

Explain this to me

Explanation

We’re studying a complicated function

F(x)=ddx[ex20xsin(t3)+ln(1+t2)1+t4dt]n=1(1)nn2cos(nx2+n)limNk=1N(1+x2k2ex/k).F(x) = \frac{d}{dx}\Bigg[ e^{x^{2}} \int_{0}^{x} \frac{\sin(t^{3}) + \ln(1+t^{2})}{1+t^{4}}\,dt \Bigg] - \sum_{n=1}^{\infty} \frac{(-1)^{n}}{n^{2}} \cos(n x^{2} + \sqrt{n}) - \lim_{N\to\infty} \prod_{k=1}^{N} \left(1+\frac{x^{2}}{k^{2}} e^{-x/k}\right).

The goal here is to understand what each piece means and how it behaves, not to compute an exact closed form.


1. First term: derivative of a product with an integral

The first term is

G(x)=ddx[ex20xsin(t3)+ln(1+t2)1+t4dt].G(x) = \frac{d}{dx}\Bigg[ e^{x^{2}} \int_{0}^{x} \frac{\sin(t^{3}) + \ln(1+t^{2})}{1+t^{4}}\,dt \Bigg].

Inside the derivative, we have a product:

  • ex2e^{x^{2}}: a rapidly growing smooth function.
  • I(x)=0xsin(t3)+ln(1+t2)1+t4dtI(x) = \int_{0}^{x} \dfrac{\sin(t^{3}) + \ln(1+t^{2})}{1+t^{4}}\,dt: an integral whose upper limit is xx, so it depends on xx.

To differentiate ex2I(x)e^{x^{2}} I(x), use the product rule:

G(x)=(ex2)I(x)+ex2I(x).G(x) = (e^{x^{2}})' I(x) + e^{x^{2}} I'(x).
  1. Derivative of ex2e^{x^{2}}:
(ex2)=2xex2.(e^{x^{2}})' = 2x e^{x^{2}}.
  1. Derivative of the integral I(x)I(x): by the Fundamental Theorem of Calculus, if I(x)=0xf(t)dt,I(x) = \int_0^x f(t)\,dt, then I(x)=f(x).I'(x) = f(x). Here
f(t)=sin(t3)+ln(1+t2)1+t4,f(t) = \frac{\sin(t^{3}) + \ln(1+t^{2})}{1+t^{4}},

so

I(x)=sin(x3)+ln(1+x2)1+x4.I'(x) = \frac{\sin(x^{3}) + \ln(1+x^{2})}{1+x^{4}}.

Putting this together:

G(x)=2xex2I(x)+ex2sin(x3)+ln(1+x2)1+x4.G(x) = 2x e^{x^{2}} I(x) + e^{x^{2}} \cdot \frac{\sin(x^{3}) + \ln(1+x^{2})}{1+x^{4}}.

So the first term is a smooth function built from:

  • a growing factor ex2e^{x^{2}},
  • an accumulated integral I(x)I(x),
  • plus a contribution from the instantaneous value of the integrand at t=xt = x.

In the visualization, we’ll treat this term as a green-ish curve you can show or hide, and we approximate the integral numerically.


2. Second term: an infinite oscillating series

The second term is

S(x)=n=1(1)nn2cos(nx2+n).S(x) = \sum_{n=1}^{\infty} \frac{(-1)^{n}}{n^{2}} \cos(n x^{2} + \sqrt{n}).

Features:

  • Oscillation: each term is a cosine with phase nx2+nn x^{2} + \sqrt{n}; varying both in nn and xx.
  • Alternating sign: (1)n(-1)^n flips the sign of each term.
  • Damping: the factor 1n2\dfrac{1}{n^2} makes the terms shrink quickly, so the series converges for all real xx.

Mathematically:

  • For large nn, (1)nn2cos(nx2+n)1n2,\bigg|\frac{(-1)^n}{n^2} \cos(n x^2 + \sqrt{n})\bigg| \le \frac{1}{n^2}, and 1/n2\sum 1/n^2 converges, so S(x)S(x) is absolutely convergent.
  • Being a nice sum of smooth terms, under standard theorems, S(x)S(x) is smooth in xx and you can usually differentiate term-by-term on bounded intervals.

In the visualization, we truncate the sum at some NN (e.g., N=50N=50 or user-controlled), and show how the partial sums approximate the series as a magenta curve.


3. Third term: an infinite product

The third term is

P(x)=limNk=1N(1+x2k2ex/k).P(x) = \lim_{N\to\infty} \prod_{k=1}^{N} \Bigg(1 + \frac{x^{2}}{k^{2}} e^{-x/k}\Bigg).

This is an infinite product: instead of adding infinitely many terms, we multiply infinitely many factors.

Each factor:

  • 1+x2k2ex/k1 + \dfrac{x^{2}}{k^{2}} e^{-x/k}.
  • For fixed xx, as kk\to\infty, x2/k20x^2/k^2 \to 0, so each new factor is very close to 1.

Convergence idea:

  • For large kk, x2k2ex/k\dfrac{x^2}{k^2} e^{-x/k} behaves like Ck2\dfrac{C}{k^2}, so the series kx2k2ex/k\sum_k \dfrac{x^2}{k^2} e^{-x/k} converges.
  • A classical criterion: if ak<\sum |a_k| < \infty, then (1+ak)\prod (1 + a_k) converges to a nonzero limit (assuming terms avoid hitting 0).
  • Here, ak=x2k2ex/ka_k = \dfrac{x^2}{k^2} e^{-x/k}, so the product converges for any fixed real xx.

At x=0x = 0, every factor becomes 11, so

P(0)=1.P(0) = 1.

In the visualization, we approximate the product up to some NN, track the cumulative product, and plot an orange curve.


4. Putting it together: the full function F(x)F(x)

We define

F(x)=G(x)S(x)P(x).F(x) = G(x) - S(x) - P(x).

Conceptual behavior:

  • Smoothness: each component (derivative-of-integral, convergent series, convergent product) is smooth in xx. So F(x)F(x) is very smooth.
  • Growth / decay:
    • G(x)G(x) can grow quickly because of ex2e^{x^2}.
    • S(x)S(x) stays bounded, oscillating.
    • P(x)P(x) is positive and typically not enormous because each factor is close to 1.

At x=0x=0:

  1. Integral term:
    • I(0)=00()dt=0I(0) = \int_0^0 (\cdots) dt = 0.
    • So the product inside the derivative is e00=0e^{0} \cdot 0 = 0.
    • But we care about G(0)G(0), the derivative at 0:
G(0)=20e0I(0)+e0sin(03)+ln(1+02)1+04=0+10+ln11=0.G(0) = 2\cdot 0 \cdot e^{0} I(0) + e^{0} \cdot \frac{\sin(0^3) + \ln(1+0^2)}{1+0^4} = 0 + 1 \cdot \frac{0 + \ln 1}{1} = 0.
  1. Series term:
S(0)=n=1(1)nn2cos(n).S(0) = \sum_{n=1}^{\infty} \frac{(-1)^{n}}{n^{2}} \cos(\sqrt{n}).

This has no simple closed form, but it converges to some finite real number.

  1. Product term:
P(0)=1.P(0) = 1.

So

F(0)=G(0)S(0)P(0)=0S(0)1=S(0)1.F(0) = G(0) - S(0) - P(0) = 0 - S(0) - 1 = -S(0) - 1.

In other words, F(0)F(0) is a specific real constant, determined by that convergent series minus 1.


5. What the visualization shows

The interactive canvas helps you build intuition by:

  • Plotting on a horizontal xx-axis (with a Cartesian transform) the following curves:

    • First term G(x)G(x) (cyan/green): derivative of the integral-product.
    • Series S(x)S(x) (pink/magenta): partial sums with NN terms.
    • Product P(x)P(x) (yellow/orange): partial products with NN factors.
    • Full function F(x)F(x) (bright cyan): combination of the three.
  • Letting you control:

    • the x–range so you can zoom in/out,
    • the number of terms used to approximate the series and product,
    • which components are visible.
  • Using light animation to show how partial sums/products stabilise as NN increases.

Focus points while exploring:

  • Near x=0x=0: observe that all components behave smoothly and that the product tends to 1.
  • As x|x| grows: watch the first term grow due to ex2e^{x^2}, while the series still oscillates and the product deforms more gently.
  • Vary the term count: see partial sums/products converge visually.

This doesn’t give a closed-form formula for F(x)F(x), but it gives a strong qualitative picture of how each component behaves and how they interact to form the full function.

Interactive Visualization

Parameters

-3.00
3.00
200.00
30.00
30.00
Dissecting a Wild Function: Derivative + Infinite Series + Infinite Product