TransWikia.com

Plot a function defined on terms on its value on an interval

Mathematica Asked on January 6, 2021

Besicovitch-Ursell family of fractal functions uses the following auxiliary definition:

$phi(x) = 2x$ on $[0,1/2]$.

$phi(-x) = phi(x+1)$ otherwise.

Is there a way to plot this in Mathematica?

2 Answers

Perhaps

[Phi][x_] :=Which[0 <= x <= 1/2, 2 x, x < 0, [Phi][1 + x], True, [Phi][1 -x]]
Plot[[Phi][x], {x, -2, 2}]

enter image description here

is what you are looking for?

Correct answer by Ulrich Neumann on January 6, 2021

Knopp function plot

Also called Knopp function in Edgar's other book:

f[x_] := 2*x /; 0 <= x <= 1/2
f[x_] := 2 - 2*x /; 1/2 < x <= 1

ff[x_] = f[Mod[Abs[x], 1]];
Plot[f[Mod[Abs[x], 1]], {x, 0, 2}]

Answered by Roger Bagula on January 6, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP