# Is there any way to manipulate a sine function such that the amplitude when it is positive is larger than when it is negative?

Asked by Mariah (23235) November 28th, 2012

Without using a piecewise function? I’m thinking I’m gonna need a piecewise function, but it would be so much more elegant without.

If my title wasn’t clear, basically what I’m looking for is a sine wave that has a peak at y=2 but a trough at y=-1.

This is not homework.

Observing members: 0 Composing members: 0

Herp derp. I think I have an effective solution. Not quite what I was looking for, but. Just a slight vertical shift upwards. More of the wave will then lie above the x axis. If anyone has something better, do chime in!

Mariah (23235)

What @Mariah said. Your sine function would have an amplitude of 1.5 centered around y = 0.5.

Seiryuu (254)

It wouldn’t fit the definition of a sine wave in that case

ETpro (34386)

f(x) = (sin x) * (exp(sin x))

bob_ (19475)
Response moderated (Spam)

@bob….you’re a genius.

Mariah (23235)

@Mariah Always happy to help! :)

Out of curiosity, what do you need this for?

bob_ (19475)

I have a project in the works. I’ll PM you.

Mariah (23235)

Isn’t the maximum of (sin x) * (exp(sin x)) the number e and its minimum -1/e?

BonusQuestion (1482)
bob_ (19475)

The details aren’t important. @bob_‘s function does what I need, although I would still be interested if there were other ideas.

Mariah (23235)
Response moderated (Spam)

Well, then take any continuous function f(x) over [-1, 1] and consider f(sin(x)). It seems to do what you want to do. You can choose f(x) to be strictly increasing or strictly decreasing to make sure it comes out to have only one “wave”.

BonusQuestion (1482)

More precisely if maximum and minimum values of f over [-1, 1] are M and m, respectively, then the function g(x) = (3 f(sin x) – (M+2m))/(M – m) has a maximum of 2 and a minimum of -1.

BonusQuestion (1482)

or