I've written some code which allows me to see 3 linear equations on a single graph and their intersections, using numpy in python, and here is the code for this part:
import numpy as np
import math
import matplotlib.pyplot as plt
`t = np.linspace(0, 2*math.pi, 5)`
`a = np.sin(t)`
`b = np.cos(t)`
`c = a + b`
plt.plot(t, a, 'y')
plt.plot(t, b, 'b')
plt.plot(t, c, 'r')
plt.show()
This shows 3 graphs on a single axis which shows my intersections.
Now I have 2 different linear equations with variables x
and y
in the equations, but using the method I've used above, the python program won't run and don't see how I can go about drawing the 2 linear equations as graphs on a single axis in python numpy code.
Here are the 2 equations:
x*sin(x + 0.16y) = y
and
(x^2)/(4)^2 + ((y+1)^2)/4 = 1
Any help on how to program code for graphs of these linear equations would be very much appreciated, thank you.