i am trying to plot the distance-carrier_concentration graph above with these formulas:
-and-

(p-side: x < -xp , n-side: x > xn)
But i could draw only red lines on the graphs with these formulas. How can i or with what formula draw black lines on the graph that majority carrier and space charge region concentration?
I am new and i need your help :) Thanks in advance.