ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Intersection point in graphs (https://www.excelbanter.com/excel-discussion-misc-queries/52717-intersection-point-graphs.html)

rk0909

Intersection point in graphs
 
All,
I have 2 sets of data. One set is directly proportional to the data on
x-axis and the other is is inversely proportional. I want to find out at
which point on the x-axis do the 2 data sets intersect. I can see it
graphically but I need some kind of a formula to spit out that intersection
point.
Any help, suggestions will be appreciated.
Thanks,
R.K.

MrShorty

Intersection point in graphs
 

General answer:

If we have two functions y1=f(x) and y2=g(x), we find the point(s) of
intersection by setting y1=y2 [f(x)=g(x)]and solving for x.

Specific case:

directly proportional function y1=f(x)=ax
indirectly proportional funciton y2=g(x)=b/x
set them equal ax=b/x - x^2=b/a - x=+/- sqrt(b/a)

I leave it to you to decide if you want the positive root or the
negative root, or if I have correctly/incorrectly interpreted the form
of your functions.


--
MrShorty
------------------------------------------------------------------------
MrShorty's Profile: http://www.excelforum.com/member.php...o&userid=22181
View this thread: http://www.excelforum.com/showthread...hreadid=480125


rk0909

Intersection point in graphs
 
Thanks Mr. Shorty. Problem I am facing is that thought the relationships are
directly and inversely proportional but they are not perfect linear
equations. In that case how do I solve for intersection point. Is there a
code or formulae?
Thanks again for your help.
RK

"MrShorty" wrote:


General answer:

If we have two functions y1=f(x) and y2=g(x), we find the point(s) of
intersection by setting y1=y2 [f(x)=g(x)]and solving for x.

Specific case:

directly proportional function y1=f(x)=ax
indirectly proportional funciton y2=g(x)=b/x
set them equal ax=b/x - x^2=b/a - x=+/- sqrt(b/a)

I leave it to you to decide if you want the positive root or the
negative root, or if I have correctly/incorrectly interpreted the form
of your functions.


--
MrShorty
------------------------------------------------------------------------
MrShorty's Profile: http://www.excelforum.com/member.php...o&userid=22181
View this thread: http://www.excelforum.com/showthread...hreadid=480125



MrShorty

Intersection point in graphs
 

In many cases, it is difficult or impossible to find an algebraic
solution like I suggested above. Back to the general case:

Set spreadsheet up so you have a cell calculating f(x)-g(x) at some x
that is reasonable. Then you can use Goal Seek or Solver (Goal Seek is
easier to use, but Solver is more robust) to numerically find the value
of x that yields f(x)-g(x)=0. There are hazards associated with such a
numerical solution (may converge to the wrong solution or may not
converge at all), but this approach is general enough to work in many
cases.


--
MrShorty
------------------------------------------------------------------------
MrShorty's Profile: http://www.excelforum.com/member.php...o&userid=22181
View this thread: http://www.excelforum.com/showthread...hreadid=480125


Pan

Intersection point in graphs
 

I believe rk0909 does not has f(x) or g(x)
only has two series of X-Y values
It's possible to build up two equaltion,that just exactly as Excel's
bezier curve for both series
and solve them
however it's too complex,and not worth to do it if you want to do this
intersection-find job only few times


--
Pan
------------------------------------------------------------------------
Pan's Profile: http://www.excelforum.com/member.php...o&userid=28144
View this thread: http://www.excelforum.com/showthread...hreadid=480125



All times are GMT +1. The time now is 08:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com