common tangent of two curves I need simple code
Show older comments
I need the slope of common tangent given in the figure below. Actually I need the coordinates of common tangent touching points to each curve. It seems easy for the curves below but I have very different and difficult curves and I need to find very accurately.
I need the slope of the tangent and I need the equation of tangent line if possible. I can do it analytically but I need a simple code to do it because I will do it for many curves.. I understand gradient or diff but the code I need must be for both numerical and symbolic. The problem is that if I have a very steep curve I may not have a good approximation with numerical methods. Is it possible with simple code?
Thanks,
best wishes,

4 Comments
muhsin ider
on 25 Oct 2019
muhsin ider
on 25 Oct 2019
Edited: muhsin ider
on 25 Oct 2019
"it is not a math problem. "
"... the program code then compare these slopes and reports which x value these slopes are equal to each other."
I thought of 2 problems with this approach.
- There many be many points that have approximately the same slope between the two curves. For example, at the minima of the curves, the slopes are both 0.
- The slopes between the two curves will probably not exactly match. For example, at the two points in your image that share the same slope, one may be -0.499124 while the other is -0.498456.
Perhaps another idea would be to find the line that connects two interpolated points, one from each parabola, that has the lowest y-intercept. Or maybe, find the line that connects points from each parabola that contains no coordinates below the line.
muhsin ider
on 25 Oct 2019
Edited: Adam Danz
on 25 Oct 2019
Answers (0)
Categories
Find more on Time Series Events in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!