Question: How to mark intersection points

Suppose I am plotting a 2D plot and want to highlight the point where two lines intersect. I would like to display this intersection point inside the plot in black font, mark it with an arrow or some visual highlight, and clearly label it. How can I do this?

Additionally, instead of using different colours (blue, green, red) for the lines, I want to distinguish them using different line styles such as solid, dotted, and long-dashed lines. How can I make these changes?

restart

with(Optimization); with(plots); with(Student[VectorCalculus]); with(LinearAlgebra)

NULL

_local(Pi)

Pi

(1)

NULL

NULL

``

M_w := b*(((Cr*alpha*((-g*i2+a)*Cr+2*Crm+2*c-2*Pr)*b+((g*i2-a)*Cr-2*Crm-2*c+2*Pr)*alpha-(-g*i2+a)*Cr)*d+alpha*((-g*i2+a)*Cr+2*Crm+2*c-2*Pr)*b+2*g*i2-2*a)*rho0+(2*((Cr*b-1)*d+b))*(delta+Cn-Pr-1))^2*d/(8*(Cr*b*d+b-d)^2*(((Cr*alpha*b-alpha+1)*d+alpha*b)*rho0^2-2*b*d*(delta-1)))

(1/8)*b*(((Cr*alpha*((-g*i2+a)*Cr+2*Crm+2*c-2*Pr)*b+((g*i2-a)*Cr-2*Crm-2*c+2*Pr)*alpha-(-g*i2+a)*Cr)*d+alpha*((-g*i2+a)*Cr+2*Crm+2*c-2*Pr)*b+2*g*i2-2*a)*rho0+(2*(Cr*b-1)*d+2*b)*(delta+Cn-Pr-1))^2*d/((Cr*b*d+b-d)^2*(((Cr*alpha*b-alpha+1)*d+alpha*b)*rho0^2-2*b*d*(delta-1)))

(2)

``

``

``

M_D := (Cr*rho0*t*(Cr*alpha*b-alpha-1)*d^2+((alpha*((-g*i2+a)*Cr+2*Crm+2*c+3*t-2*Pr)*Cr*b+((g*i2-a)*Cr-2*Crm-2*c-2*t+2*Pr)*alpha+(g*i2-a)*Cr-2*t)*rho0+(2*(Cr*b-1))*(sigma*t+Cn-Pr+delta-1))*d+(alpha*((-g*i2+a)*Cr+2*Crm+2*c+2*t-2*Pr)*b+2*g*i2-2*a)*rho0+2*b*(sigma*t+Cn-Pr+delta-1))^2*d*b/((8*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*(delta-1))*(Cr*b*d+b-d)^2)

(4)

``

``

NULL

NULL

DATA1 := [delta = .9, a = 0.1e-1, g = .25, c = 0.5e-1, rho0 = .4, Cn = .4, Crm = .1, i2 = 0.6e-1, t = 0.1e-1, alpha = .95, s = 0.1e-1, Pr = .35, upsilon = .95, b = .5, d = .3, Cr = 0.1e-1]

[delta = .9, a = 0.1e-1, g = .25, c = 0.5e-1, rho0 = .4, Cn = .4, Crm = .1, i2 = 0.6e-1, t = 0.1e-1, alpha = .95, s = 0.1e-1, Pr = .35, upsilon = .95, b = .5, d = .3, Cr = 0.1e-1]

(5)

P11 := subs(DATA1, M_w); P21 := subs(DATA1, M_D); P31 := subs(DATA1, M_S)

0.9301486586e-2

 

4.251178959*(-0.4764573140e-1+0.4030e-2*sigma)^2

 

4.251178959*(-0.4917713136e-1+0.4030e-2*sigma)^2

(6)

``

A1 := plot([P11, P21, P31], sigma = 0 .. .7, color = ["Red", "Blue", "Green"], labels = [sigma, `π__m`], labeldirections = ["horizontal", "vertical"], legend = [`#msubsup(mi("π"),mi("n"),mn("W"));`, `#msubsup(mi("π"),mi("n"),mn("D"));`, `#msubsup(mi("π"),mi("n"),mn("DS"));`], axis[2] = [color = "#600000"])

 

NULL

display(A1, pointplot([[X, Y]], symbol = circle, symbolsize = 25, color = blue))

Error, (in plots:-pointplot) points cannot be converted to floating-point values

 
 

NULL

Download Manf_profit__t_graph_changes_needed.mw

Please Wait...