Message Boards Message Boards

3 Replies
0 Total Likes
View groups...
Share this post:

Give an example of a function when I have two intervals

Posted 9 years ago

I was wondering if there's a widged that can help me calculate or form a function of when I know the two intervals.

example: Create a function f(x) that has a postivie derivative interval (-1 , 0) and a negative derivative interval (0,1)

f(x) = ?

If there aint one, anyone who can give me a step by step solution cause I am completly lost on how to do it.

POSTED BY: Ayapak Secret
3 Replies

Take, for instance

    f(x)  = - x^2

(you know the notation x^2 ? It means x squared, also known as x times x). You should be able to verify (without using Mathematica) that this function satisfies your condition. Otherwise you are in the wrong course.

POSTED BY: Ulrich Mutze

One way is with DSolveValue:

DSolveValue[{f'[x] == Piecewise[{{1, -1 < x < 0}, {-1, 0 <= x < 1}}], 
  f[0] == 0}, f[x], x]
Plot[%, {x, -2, 2}]
POSTED BY: Gianluca Gorni
Posted 9 years ago

Hi there!

Thanks for the answer, but I'm not exactly sure what to do with those lines. I copied it into the Wolfram search bar and got a page up, would the answer to my question be the diffrential equation solution? The reason I'm asking is the fact that I can't actually write it like that in the online course I'm taking and I need a "normal" function and I don't know how to begin making one.

POSTED BY: Ayapak Secret
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract