Why logarithms restrict a domain
A formula can look meaningful at a point and still fail to have a real value there. For a formula containing a logarithm, the key question is whether the expression inside that logarithm is positive. Unlike a polynomial, a real logarithm cannot accept zero or a negative number as its argument.
In several variables, the argument may depend on two or more inputs. Finding the domain then means translating its positivity into an inequality and identifying the input values that satisfy it. The result may be a half-plane, the interior of a circle, or another region described by a strict inequality.
The definition behind the restriction
For a fixed real base \(b\), the logarithm \(\log_b u\) is defined when \(b>0\), \(b\ne 1\), and \(u>0\). The natural logarithm \(\ln u\) is the logarithm with base \(e\), so it has the same restriction on its argument. In this tutorial the base is fixed and valid; the domain condition to solve is the positivity of the argument \(u\).
For example, \(\ln(x+y)\) is defined at \((x,y)\) precisely when \(x+y>0\). It is not enough for the argument to be nonnegative: if \(x+y=0\), the expression would be \(\ln 0\), which has no real value.
Why the argument must be positive
The restriction follows from what a logarithm means. The value \(\log_b u\) is the exponent \(r\) such that \(b^r=u\). For a valid real logarithm base \(b>0\), the exponential value \(b^r\) is positive for every real exponent \(r\). Therefore it cannot equal zero or a negative number. Conversely, every positive \(u\) has a real logarithm for such a base.
This proves the test, rather than merely suggesting it: the equation \(b^r=u\) has a real solution \(r\) exactly when \(u>0\). Thus each logarithmic argument must satisfy a strict positivity inequality. Solving that inequality is the central task.
Worked Example: A linear argument in two variables
Worked Example: A linear argument in two variables
Find the domain of \(f(x,y)=\ln(2x-y+4)\).
The argument is \(2x-y+4\). Require it to be strictly positive:
To describe the allowed \(y\)-values, isolate \(y\). First subtract \(2x+4\) from both sides:
Multiplying an inequality by \(-1\) reverses its direction, so
The domain is the half-plane below the line \(y=2x+4\). The line itself is excluded because points on it make the logarithm's argument zero.
Check an included point: at \((0,0)\), the argument is \(2(0)-0+4=4>0\), so \(f(0,0)=\ln 4\) is defined. Check a boundary point: at \((0,4)\), the argument is \(0-4+4=0\), so the formula is not defined there. Both checks agree with the strict inequality \(y<2x+4\).
Solving quadratic positivity conditions
Some logarithmic arguments are quadratic. A common pattern is a sum of squares minus a constant, or a constant minus a sum of squares. The same rule applies: write the argument \(>0\), then solve the resulting inequality. Pay attention to whether the inequality describes the inside or the outside of a circle, and retain the strict boundary exclusion.
Worked Example: The interior of a circle
Find the domain of \(g(x,y)=\log_2(9-x^2-y^2)\).
The base \(2\) is positive and is not \(1\). The argument must therefore satisfy
Move the squared terms to the other side by subtracting \(9\) and multiplying by \(-1\), which reverses the inequality:
The domain is the interior of the circle of radius \(3\) centered at the origin. The circle itself is not included. For instance, at \((1,2)\), the argument is \(9-1^2-2^2=9-1-4=4>0\), and \(g(1,2)=\log_2 4=2\). At the boundary point \((0,3)\), the argument is \(9-0-9=0\), so the logarithm is undefined. This confirms that the domain uses \(x^2+y^2<9\), not \(x^2+y^2\le 9\).
Arguments depending on three variables
The number of variables does not change the logarithm rule. It only changes how many inputs appear in the inequality. A linear inequality in three variables describes a region in three-dimensional space. It can often be written with one variable isolated, which makes the allowed values easier to interpret.
Worked Example: A linear argument in three variables
Find the domain of \(h(x,y,z)=\ln(12-3x+2y-z)\).
Require the argument to be positive:
Isolate \(z\). Add \(z\) to both sides, then subtract \(12-3x+2y\) from both sides:
or equivalently,
Thus the domain consists of points below the plane \(z=12-3x+2y\), in the sense of satisfying this inequality. The plane itself is excluded. At \((0,0,0)\), the argument is \(12-0+0-0=12>0\), so the logarithm is defined. At \((0,0,12)\), the argument is \(12-12=0\), so it is undefined. These substitutions check both the allowed side and the excluded boundary.
When a logarithm argument is factored
An argument may be written as a product. In that case the product must be positive; it is not necessary for each factor to be positive separately. A product of two nonzero real numbers is positive when both factors have the same sign. This gives two sign cases to check.
Worked Example: A product argument
Find the domain of \(q(x,y)=\ln((x-1)(y+2))\).
The condition is
The product is positive in either of two cases: both factors are positive, or both are negative. If both are positive, then \(x-1>0\) and \(y+2>0\), giving \(x>1\) and \(y>-2\). If both are negative, then \(x-1<0\) and \(y+2<0\), giving \(x<1\) and \(y<-2\). These cases together describe the allowed inputs.
Check the first case at \((2,0)\): the argument is \((2-1)(0+2)=1\cdot2=2>0\). Check the second case at \((0,-3)\): the argument is \((0-1)(-3+2)=(-1)(-1)=1>0\). At \((2,-3)\), the argument is \((1)(-1)=-1\), so the logarithm is undefined. If either factor is zero, the product is zero and is also excluded. These checks confirm the same-sign condition.
More than one logarithm in a formula
If a formula contains multiple logarithms, test each argument separately. Every logarithm must be defined for the formula to have a real value. For example, in \(\ln(x+2)+\ln(3-y)\), the first logarithm requires \(x+2>0\), and the second requires \(3-y>0\). Solving gives \(x>-2\) and \(y<3\); an input must satisfy both conditions. A point such as \((0,0)\) satisfies them, while \((-2,0)\) does not because its first argument is zero.
Do not replace these separate tests with a condition on the sum of the arguments. The expression is a sum of two logarithms, not one logarithm whose argument is the sum. Each displayed logarithm has its own argument and must be valid on its own.
A common mistake: allowing zero
A frequent error is to use a non-strict inequality, as if a logarithm could accept zero. For example, consider \(\ln(x^2-4)\). The incorrect calculation is
This includes \(x=-2\) and \(x=2\). At either value, however, \(x^2-4=0\), and \(\ln 0\) is undefined. The correction is to require strict positivity:
For a check, \(x=3\) gives argument \(9-4=5>0\), while \(x=2\) gives argument \(4-4=0\). The strict inequality correctly includes the first input and excludes the second.
Check Your Understanding
For each formula, determine the condition imposed by its logarithm or logarithms.
- What inequality describes the domain restriction for \(f(x,y)=\ln(3x+y-1)\)?
- Does \((1,1)\) belong to the logarithmic domain of \(g(x,y)=\ln(4-x^2-y^2)\)? Explain by evaluating the argument.
- For \(h(x,y,z)=\ln(5-x+y-z)\), isolate \(z\) in the positivity condition.
- Why is \(x=2\) excluded from the domain of \(\ln(x^2-4)\)?
- For \(p(x,y)=\ln(x+1)+\ln(4-y)\), what condition must each argument satisfy?