# Find intersection between curves in julia

**URL:** <https://discourse.julialang.org/t/find-intersection-between-curves-in-julia/70494>\
**Category:** New to Julia\
**Tags:** roots, interpolations, splines\
**Created:** [October 27, 2021, 3:47pm UTC](https://discourse.julialang.org/t/find-intersection-between-curves-in-julia/70494 "2021-10-27T15:47:41Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [October 27, 2021, 4:45pm UTC](https://discourse.julialang.org/t/find-intersection-between-curves-in-julia/70494/4 "2021-10-27T16:45:27Z")

</div>

For this problem, Dierckx is just fine:

```julia
using Dierckx
n = length(vin_y)
spl = Spline1D(1:n, col_y[1:n] - vin_y)
x0 = roots(spl) # 2.4181
y0 = Spline1D(1:n, vin_y)(x0) # 1.2583e8

```

 ![Dierckx_curve_intersection](https://global.discourse-cdn.com/julialang/original/3X/5/a/5a0684a75f93443b39e39fbf4dc954be03c2b327.png)

---

_[View the full topic](https://discourse.julialang.org/t/find-intersection-between-curves-in-julia/70494)._
