Message Boards Message Boards

0
|
5062 Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

Give an example of a function when I have two intervals

Posted 10 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

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 10 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

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
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract