A Wild Function: Derivative + Integral + Series + Infinite Product

December 14, 2025

Problem

Explain this

Explanation

We are building and visualizing a very 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}{d x}\left[e^{x^{2}} \int_{0}^{x} \frac{\sin (t^{3})+\ln (1+t^{2})}{1+t^{4}} dt\right] - \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).

This panel explains each piece conceptually, and the canvas shows how these pieces combine and behave as you vary parameters.


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

Consider

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

The first term of F(x)F(x) is G(x)G'(x). This is a product of:

  • an outer factor ex2e^{x^{2}}, and
  • an integral that depends on the upper limit xx.

To differentiate G(x)G(x), we use:

  1. Product Rule
(uv)=uv+uv,(u v)' = u'v + u v',

with

  • u(x)=ex2u(x)=e^{x^{2}}, so u(x)=2xex2u'(x) = 2x e^{x^{2}},
  • v(x)=0xf(t)dtv(x) = \displaystyle \int_{0}^{x} f(t)\,dt, where
f(t)=sin(t3)+ln(1+t2)1+t4.f(t) = \frac{\sin(t^{3}) + \ln(1+t^{2})}{1+t^{4}}.
  1. Fundamental Theorem of Calculus (FTC):
ddx0xf(t)dt=f(x).\frac{d}{dx} \int_{0}^{x} f(t)\,dt = f(x).

Putting these together:

G(x)=2xex20xf(t)dt+ex2f(x).G'(x) = 2x e^{x^{2}} \int_{0}^{x} f(t)\,dt + e^{x^{2}} f(x).

So the first term of F(x)F(x) is a combination of:

  • the accumulated area under the curve f(t)f(t) from 0 to xx, and
  • the instantaneous value of ff at t=xt=x, all weighted by the growing factor ex2e^{x^{2}}.

In the visualization, you can:

  • slide xx to see how the integral 0xf(t)dt\int_0^x f(t) dt builds up,
  • see how ex2e^{x^{2}} amplifies this accumulation, and
  • see the derivative G(x)G'(x) as a moving point on a curve.

2. Second term: oscillating infinite series

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:

  • Oscillations: each term is a cosine with phase nx2+nn x^{2} + \sqrt{n}, so as nn increases, the oscillation frequency in xx becomes more and more rapid.
  • Alternating sign: the factor (1)n(-1)^n makes successive terms flip sign.
  • Decay: 1/n21/n^{2} makes each term smaller as nn grows.

The decay 1/n21/n^{2} is strong enough that the series converges for every real xx. Intuitively, the more we add high-index terms, the more refined “ripples” we add, but they are smaller and smaller.

In the visualization, you can:

  • adjust the number of terms NN used in the partial sum SN(x)=n=1NS_N(x)=\sum_{n=1}^N \dots,
  • see the graph of this finite approximation and how adding more terms refines the wavy structure but does not blow up.

3. Third term: infinite product

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

For each fixed xx:

  • We multiply many small factors 1+x2k2ex/k1 + \frac{x^{2}}{k^{2}} e^{-x/k}.
  • As kk grows, x2k2\frac{x^{2}}{k^{2}} tends to 0 and ex/k1e^{-x/k}\to 1, so each factor tends to 1.
  • The infinite product converges if these small deviations from 1 are “summably small”.

Intuitively, P(x)P(x) behaves like:

  • 1 when xx is very small (all factors are close to 1),
  • something more structured for larger xx, depending on the whole infinite ladder of multiplicative corrections.

In the visualization, we approximate

PN(x)=k=1N(1+x2k2ex/k)P_N(x) = \prod_{k=1}^{N}\left(1+\frac{x^{2}}{k^{2}} e^{-x / k}\right)

with a finite NN and show how the curve stabilizes as you increase NN.


4. The full function F(x)F(x)

Putting everything together,

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

Each part contributes a different "personality":

  • First term G(x)G'(x): smooth growth shaped by the integral and boosted by the exponential.
  • Second term S(x)S(x): oscillatory “ripples” at many scales due to the cosine series.
  • Third term P(x)P(x): more subtle multiplicative shaping through the infinite product.

Around special points (like x=0x=0) you can analyze:

  • The integral near 0: the integrand is continuous and bounded, so 0xf(t)dtf(0)x\int_0^x f(t) dt \approx f(0)x for small xx.
  • The exponential: ex21+x2e^{x^{2}} \approx 1 + x^{2}.
  • The series and the product can be studied term-by-term at x=0x=0:
    • S(0)=n=1(1)nn2cos(n)S(0) = \sum_{n=1}^{\infty} \frac{(-1)^n}{n^{2}} \cos(\sqrt{n}) — a convergent numerical constant.
    • P(0)=k=1(1+0)=1P(0) = \prod_{k=1}^{\infty} (1+0) = 1.

The visualization does not attempt to compute exact symbolic values but lets you see how:

  • the derivative of the integral term behaves as you move xx,
  • the partial sums of the series add finer oscillations,
  • the partial products shape the overall magnitude.

How to use the visualization

  • Use the x-position slider to explore F(x)F(x) along the horizontal axis.
  • Use term / product depth sliders to see how the series and product parts approach their infinite limits.
  • Use component toggles to isolate each building block: integral-derivative, series, and product.
  • Watch the animated construction along the curve as time passes (the tracer moves with a parameter along the graph).

Mathematically, this kind of function is an example used to discuss:

  • convergence (of the series and product),
  • smoothness (differentiability, continuity),
  • and how powerful tools (FTC, product rule, infinite sums/products) combine to create highly nontrivial functions.

The canvas turns these abstract constructions into a live, layered picture of how F(x)F(x) is built.

Interactive Visualization

Parameters

0.00
8.00
12.00
10.00
Your turn

Got your own math or physics problem?

Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.

Sign Up Free to Try It30 free visualizations every day
A Wild Function: Derivative + Integral + Series + Infinite Product | MathSpin