4

How can I find the intersection between two interpolation functions?

data1 = Table[10*x, {x, 0, 10, 1}]
data2 = Table[-10*x, {x, -10, 2, 1}]

intdata1 = Interpolation[data1];
intdata2 = Interpolation[data2];

ListLinePlot[{data1, data2}]

Solve[intdata1[x] == intdata2[x], x]

This doesn't work, with an error of

Solve::nsmet: This system cannot be solved with the methods available to Solve.

Tomi
  • 4,366
  • 16
  • 31

1 Answers1

9
In[9]:= x/.FindRoot[intdata1[x]==intdata2[x],{x,3}]
Out[9]= 6.
David Keith
  • 4,340
  • 1
  • 12
  • 28