Ask Your Question

Revision history [back]

Area under two curves

I am trying to fill in the area between two functions. F(x) = 4-x^6 and G(x) = x. it wont fill properly, it takes into consideration other areas of the functions.

x = var('x')

f(x) = 4 - x^6 g(x) = x

P1 = plot(f(x), xmin=-4,xmax= 4, color='purple',linestyle = "dashed", fill = True, legend_label='Plot of $4-x^6$') P2 = plot(g(x), -4,4, color='green',title = "Finding The Area Between Two Functions", legend_label='Plot of $x$')

show(P1+P2, ymin=-4, ymax=4)

this is my code so far.

Area under two curves

I am trying to fill in the area between two functions. F(x) functions, $F(x) = 4-x^6 4-x^6$ and G(x) $G(x) = x. it wont x$.

This is my code so far. It won't fill properly, it takes into consideration other areas of the functions.

x = var('x')

f(x) = 4 - x^6
g(x) = x

x

P1 = plot(f(x), xmin=-4,xmax= 4, color='purple',linestyle = "dashed", fill = True, plot(f, (-4, 4), color='purple', linestyle="dashed", fill=True, legend_label='Plot of $4-x^6$') P2 = plot(g(x), -4,4, color='green',title = "Finding The Area Between Two Functions", plot(g, (-4, 4), color='green', title="Area between two curves", legend_label='Plot of $x$')

$x$')

show(P1+P2, show(P1 + P2, ymin=-4, ymax=4)

this is my code so far.

ymax=4)