Properties
Similar Topics
Statistics
Comments
9
Participants
4
Subscribers
1
Votes
2
Views
9527
Share
How can I color area between 2 graphs
Answered
I have two graphs drawn.
f1(x)=sin(x)
f2(x)=cos(x)
I want to color the area between these two graphs in one period.
How can I apply color to an area between two graphs?
To generalize the question, if a graph is periodic like f(x)=tan(x), I want to color one period of the graph. How can I do that?
 GeoGebra
 Help
 Partners

Contact us
 Feedback & Questions
 This email address is being protected from spambots. You need JavaScript enabled to view it.
 +43 677 6137 2693
© 2022 International GeoGebra Institute
Have you tried:
oIntegralBetween
IntegralBetween[ <Function>, <Function>, <Number>, <Number> ]
IntegralBetween[ <Function>, <Function>, <Variable>, <Number>, <Number> ]
Tony
https://ggbm.at/1447665
No I haven't
Let me try and tell the results
You can click on show thumbnails an see it quickly, but nothing beats trying it yourself.
Tony
Dear acron
Your example is straight forward. I understand it.
I tried following
IntegralBetween[tan(x), cot(x), 0, 2]
But it says: undefined number
I am wondering if the graph is not bounded (goes to infinity) does this function works?
hello
IntegralBetween[tan(x), cot(x), 0.0001, 1.57079] is not good enough for you?
saludos
Tangent and cotangent functions have discontinuities at pi/2 and 0/pi respectively...Hence, the need to follow mathmagic's numbers. Click on thumbnails to see code and graph.
IntegralBetween[f, g, 0/ π +0.00001, π /20.00001]
Tony
https://ggbm.at/1447667
If you only want to color the area between f and g you may also use
IntegralBetween[f, g, 0, π /2,false]
https://ggbm.at/1447671
Dear Folks
Thanks your replies are informative. I am able to integral the tan(x) cot(x)
Combination of two graphs has two parts. The equation all of you provided, gives the limited part of the answer (like tow symmetric triangles)
Is there a way to color the hyperbola part in the above equation from y=1 to above?
I assume integral equation calculates the are between two graph exactly same as integrating. Although results could be used for coloring but I think there might be other command in geogebra to do coloring exactly for an area I want to focus. This area might not always coincide with the integration.
A workaround for the parabola would to have a line out of the field of view so you can use IntegralBetween. see attached.
There may be a better command.
Tony
https://ggbm.at/1447677
Comments have been locked on this page!