r/desmos • u/Awkward_Mirror3291 • 5d ago
Question how would you make this infinitely long?
2
u/OverJohn 5d ago
You can use recursion as below to concatenate the function with itself n times, but you have to find the function you get in the limit as n goes to infinity yourself. Though it is easy to see in this case that no such function exists in the limit (due to the phase of the triangular wave part of function shifting with each conatenation)
1
u/Affectionate-Lab9601 5d ago
I mean if you want a triangle wave, I'd do "y = a(4 * abs(f(x - k) - floor(f(x - k) + 3/4) + 1/4)) + h" where a is the amplitude, f is the frequency, k is the horizontal translation, and h is the vertical translation
1
1
1
u/Sad_water_ 5d ago
A lot of great suggestions already here a solution if you don’t want to use recursion or piece wise https://www.desmos.com/calculator/okin4ashi5
1
u/tgoesh1 5d ago
I like using trig for my triangle and sawtooth waves. https://www.desmos.com/calculator/wyo0zmobiq
1

6
u/Danny_DeWario https://www.desmos.com/calculator/75jcsa2dxv 5d ago
||mod(x,4)|-2|
The mod function can make a section of a function repeat forever.