# find the equation of the intersection of 2 variable function with the special plane

I have below two variable function:

(-1/(d-1))+(2d +(d-1) Abs[d-p(d+1)] +(d-1) Abs[d-p(d-1)])/((2d-2)Abs[d +p(d-1)])


And I want to find the equation of the intersection of my 2 variable function with the plane pd, In fact I want to find the p and d as a function of each other on plane pd. (I have to mentioned that p is a continuous variable between 0 and 1 and d is a discrete variable larger or equal to 2.

Define a function

f[d_, p_] := ((d - 1)*Abs[d - p*(d - 1)] + (d - 1)*Abs[d - p*(d + 1)] + 2*d)/((2*d - 2)*Abs[d + (d - 1)*p]) - 1/(d - 1)


Solve

sol = Reduce[{f[d, p] == 0, d > 2, 0 <= p <= 1}, Reals]

(* (2/3 < p < 1 && 2 < d <= -(p/(-1 + p))) || (p == 1 && d > 2) *)

• Dear Stitch, Thank you so much for your kind help. – Najmeh Nov 24 '16 at 6:37
f[p_, d_] := (-1/(d - 1)) + (2 d + (d - 1) Abs[d - p (d + 1)] + (d - 1) Abs[d - p (d - 1)])/((2 d - 2) Abs[d + p (d - 1)])

Plot[Evaluate@Table[f[p, i], {i, 2, 10}], {p, 0.6, 1}]


Table[p /. FindInstance[f[p, i] == 0 && 0 < p < 1, p][[1, 1]], {i, 2, 10}]


{2/3, 3/4, 4/5, 5/6, 6/7, 7/8, 8/9, 9/10, 10/11}

hence the proposition is that for a given integer d, the first p that makes f[p, d] == 0 is

pp[d_] := d/(d + 1)


Check:

f[pp[d], d] // FullSimplify[#, d ∈ Integers] &


• Dear Corey979, Thank you so much for your kind help, I just can understand the last step (checking). What does this command do? "f[pp[d], d] // FullSimplify[#, d ∈ Integers] &" – Najmeh Nov 24 '16 at 6:36
• @Najmeh You evaluate f[pp[d], d]. Then you FullSimplify it with the assumption d ∈ Integers (for comparison evaluate just f[pp[d], d]). The # and & is a pure function due to the postfix // notation. It's equivalent to `FullSimplify[f[pp[d], d], d ∈ Integers]'. – corey979 Nov 24 '16 at 8:09
• Dear Corey, Thank you so much. Thank you. – Najmeh Nov 24 '16 at 10:16
• @Najmeh Glad it helped. If you find an answer useful, you might want to upvoting it by clicking the gray triangle next to it, and accepting by clicking the gray checkmark. – corey979 Nov 24 '16 at 10:18
• Dear Carol, I have tried to upvoting your answer the first time I read it and also now, But I get this answer in both times I tried: " Votes cast by those with less than 15 reputation are recorded, but do not change the publicly displayed post score.| – Najmeh Nov 27 '16 at 6:12