depends on if we are talking about discrete or continuous
consider the following discrete distribution:
in this case, the median is "shared" by 2 and 3. For the purposes of Maths Methods, you take an average. i.e. median is 2.5. [I am unsure as to if there is a more correct way of doing this]
if we have continuous random distribution however, the continuity of the variable means that we can sleep soundly knowing that there is no categorical jump from the left 0.5 and the right 0.5 (there is an infinitesimal difference if you'd like). Hence, we can soundly use this:
)=\int_a^m p(x)\; dx = 0.5)
, where a is the lower-bound of the probability density function (pdf) p, and m represents a number within the domain of p such that it is the median
for the purposes of MM, p(x) would be simple to differentiate
the reverse would be the same:
)=\int_m^b p(x)\; dx = 0.5)
, where b is the right-most (greatest) value in the defined domain of p
more strictly however, probability density functions are usually defined from

to

, and evaluation would look more like
)=\int_{-\infty}^m p(x)\; dx = 0.5)
, and evaluation of integrals involving infinity requires knowledge of improper integrals (1st year/UMEP), and is not required for any year 12 courses. We accept that our pdfs is a piecewise function with non-zero values within a defined domain, and 0 elsewhere.