# β 0-1 sine wave

Just a super general math question. If I want a sine wave which has a period of 1 and an amplitude of 1 which goes between 0 and 1, what would be the most concise way to write that? I.e.

`f(0) = 0`

, `f(0.5) = 1`

, `f(1) = 0`

, as a sine wave.I can come up with

`-((cos(2 * pi * x) - 1) / 2)`

but was just wondering if there some more elegant way to write it.Won't it be just

`sin(2 * pi * x)`

?
`y = sin(2 * pi * x)`

@π Thinker πisn't that just sin(Οx)
it follows the examples you gave at least

well

black is

`sin(2 * pi * x)`

, red is the desired curveoh I'm stupid

I think red is just

`sin(pi * x)`

I thought you wanted entire period of wave to be within 0 to 1
half a period would be `sin(pi * x)`

ah, my bad on terminology then

just

`abs(sin(pi * x))`

? bouncy

yeah, you're right
shows how much I got out of trig in high school

well when actual math fails me there's always the backup

what the hell is

`sinΒ²`

sin, squared
it's the same as

`sin()Β²`

ah
huh
yeah that works, now I'm just why

why that works or how it got to that

nvm

for the second, this

you have Wolfram Alhpa pro?

nope! the mobile app just acts like you do, no idea why
best 3 usd I've ever spent

is it just me or is the shown solution here not exactly what was asked.. i just tried it and it starts at 1 instead of 0
which you then also could just do:

sinΒ²(Οx) starts at 0

uuuh crap my bad

`-cos(2 * pi * x) / 2 + 0.5`

jea i missed the - -.-