Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to Plot/Graph/Show a system of linear equations

Disclaimer: I'm new to Sage Math and Linear equations.

Background: Google will plot/graph this search: "plot 3x+4y"

Questions:

  1. In Sage Math, how can I show similar output as Google?

  2. Is there a better way, in 2D or 3D, to plot the following? 3x+4y=2.5 AND 5x-4y=25.5 ?

    x, y = var('x,y')

    a=3x+4y==2.5

    b=5x-4y==25.5

    p1=implicit_plot(a, (x,-2,5), (y,-4,4), axes="true", aspect_ratio=1)

    p2=implicit_plot(b, (x,-2,5), (y,-4,4), axes="true", aspect_ratio=1)

    show(p1+p2)

How to Plot/Graph/Show a system of linear equations

Disclaimer: I'm new to Sage Math and Linear equations.

Background: Google will plot/graph this search: "plot 3x+4y"

Questions:

  1. In Sage Math, how can I show similar output as Google?

  2. Is there a better way, in 2D or 3D, to plot the following? 3x+4y=2.5 AND 5x-4y=25.5 ?

.

x, y = var('x,y')

a=3x+4y==2.5

b=5x-4y==25.5

var('x,y') a=3*x+4*y==2.5 b=5*x-4*y==25.5 p1=implicit_plot(a, (x,-2,5), (y,-4,4), axes="true", aspect_ratio=1)

aspect_ratio=1) p2=implicit_plot(b, (x,-2,5), (y,-4,4), axes="true", aspect_ratio=1)

show(p1+p2)

aspect_ratio=1) show(p1+p2)

How to Plot/Graph/Show a system of linear equations

Disclaimer: I'm new to Sage Math and Linear equations.

Background: Google will plot/graph this search: "plot 3x+4y"

Questions:

  1. In Sage Math, how can I show similar output as Google?

  2. Is there a better way, in 2D or 3D, to plot the following? 3x+4y=2.5 AND 5x-4y=25.5 ?

.

x, y = var('x,y')
a=3*x+4*y==2.5
b=5*x-4*y==25.5
p1=implicit_plot(a, (x,-2,5), (y,-4,4), axes="true", aspect_ratio=1)
p2=implicit_plot(b, (x,-2,5), (y,-4,4), axes="true", aspect_ratio=1)
show(p1+p2)