I need a dotted line above intersection point and solid line below intersection point of any two curves where they meet. How to produce it in mathematica.
Hi Shivank
The intersection points have to be determined first. Here is one way (probably not the best)
(* All pairs of expressions *)
pairs = Subsets[M, {2}]
(* Convert to equations *)
eqns = Equal @@@ pairs
(* Find solutions *)
soln = Solve[Rationalize@#, c, Assumptions -> c > 0] & /@ eqns // Flatten
(* x and y coordinate of solutions *)
y = MapThread[ReplaceAll, {pairs, soln}] // Flatten // Round[#, .001] & // DeleteDuplicates
x = soln // Values
(* Intersection points *)
intersections = Transpose[{x, y}]
Then construct an Epilog with the type of lines you want e.g.
epilog = {Red, PointSize[Medium], Point[intersections], Blue,
Line[{{x[[1]], 0}, {x[[1]], y[[1]]}}], Dotted,
Line[{{x[[1]], y[[1]]}, {x[[1]], 180}}]}
Plot[M, {c, 0, 10},
GridLines -> Automatic,
Frame -> True,
Epilog -> epilog]
