# Signing the points were 2 functions are equal

**URL:** <https://discourse.julialang.org/t/signing-the-points-were-2-functions-are-equal/57442>\
**Category:** New to Julia\
**Tags:** plotting\
**Created:** [March 18, 2021, 5:58am UTC](https://discourse.julialang.org/t/signing-the-points-were-2-functions-are-equal/57442 "2021-03-18T05:58:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![leopdsf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/leopdsf/32/31008_2.png) [@leopdsf](https://discourse.julialang.org/u/leopdsf)\
**Post date:** [March 18, 2021, 5:58am UTC](https://discourse.julialang.org/t/signing-the-points-were-2-functions-are-equal/57442/1 "2021-03-18T05:58:51Z")

</div>

Hello, there!  
I’m working with some numerical calculations, plotting 2 diferent functions as follows:

```julia
using Plots

h=0
K=1.5
g(y) = y
j(y) = tanh(K*y+h)

plot(g,xlim=(-1.5,1.5),label=("g(y)=y"),xlabel=("y"),ylabel=("g(y),j(y)"))
plot!(j,label=("j(y)=tanh(Ky+h)"))

```

Thats working fine, and the result is this plot:  
 ![gj](https://global.discourse-cdn.com/julialang/original/3X/b/5/b5593f8cf18f52c170a98117b0cae9e1f74987f8.png)  
Now, I would like to mark the points where both functions intersect. How can I do that?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [March 18, 2021, 6:02am UTC](https://discourse.julialang.org/t/signing-the-points-were-2-functions-are-equal/57442/2 "2021-03-18T06:02:08Z")

</div>

You are looking for the roots of

```julia
f(y) = g(y) - j(y)

```

See eg

[https://github.com/JuliaMath/Roots.jl/](https://github.com/JuliaMath/Roots.jl/)

---

<div class="post-metadata">

**Author:** ![leopdsf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/leopdsf/32/31008_2.png) [@leopdsf](https://discourse.julialang.org/u/leopdsf)\
**Post date:** [March 18, 2021, 6:10am UTC](https://discourse.julialang.org/t/signing-the-points-were-2-functions-are-equal/57442/3 "2021-03-18T06:10:24Z")

</div>

Got it! Thanks!
