- Submitted by
- SciPy Central on 17 July 2011
- Download
- File
- Update history
- Revision 2 of 3: previous next
- Updated by
- kevindunn on 21 July 2011
- Tags

The code considers the case of finding the intersection of a polynomial, \(y=x^2\) and a line, \(y=x+1\).

Write these functions in the form \(\mathbf{f(x) = 0}\), in other words:

\[\begin{split}f_1(x, y) &= y - x^2 = 0\\\end{split}\]\[\begin{split}f_2(x, y) &= y - x - 1 = 0\end{split}\]

Now write your Python function, as shown in the code, so that it accepts a vector of these inputs, \(x\) and \(y\), and return another vector of outputs which contains \(\mathbf{f(x)}\).

Entry inspired by http://scipy.org/Cookbook/Intersection

Read the documentation for fsolve.