Message Boards Message Boards

0
|
6749 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Show intervals of a function where its values are increasing or decreasing?

Posted 5 years ago

Hello,

I am struggling to figure out how to code and show where these functions on a given plane are increasing and decreasing.

I've been given the following instructions. Graph: Sin(x) and Cos(x) on the same plane for -2Pi< x < 2Pi how to I code to find where Sin(X) is increasing and decreasing on this interval?

Attachments:
POSTED BY: Bishop Asamoah
2 Replies

In[1]:= Reduce[D[Sin[x], x] >= 0 && -2 [Pi] <= x <= 2 [Pi], x]

Out[1]= -2 [Pi] <= x <= -((3 [Pi])/2) || -([Pi]/2) <= x <= [Pi]/ 2 || (3 [Pi])/2 <= x <= 2 [Pi]

POSTED BY: Frank Kampas

Well the Sin(x) is decreasing when the Cos(x) >=0 You could use colorfunction?

Plot[{Sin[x], Cos[x]}, {x, -2 Pi, 
  2 Pi}, {PlotLegends -> "Expressions"}, 
 ColorFunction -> Function[{x, y}, If[Cos[x] >= 0, Black, Blue]], 
 ColorFunctionScaling -> False]
POSTED BY: l van Veen
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