These plots illustrate the Pythagorean Identity
sin(x)^2 + cos(x)^2 = 1
The graph below shows sin(x)^2 (in blue) and cos(x)^2 (in green).
To illustrate the identity, we can flip the green curve about the x axis. The distance between the two curves below is then:
sin(x)^2 + cos(x)^2
The grey line has a length of 1. Click and drag the red control point to move the line left and right. The distance between the curves is 1 at every point.
View the script here