Question
Question: Let x, y, z are real numbers such that xyz + x + z = y and xz ≠ 1. If the greatest value of the expr...
Let x, y, z are real numbers such that xyz + x + z = y and xz ≠ 1. If the greatest value of the expression (1+x22−1+y22+1+z23) is qp, where p and q are relatively prime, then (p - q) is equal to

2
3
1
4
2
Solution
Given the equation xyz+x+z=y, we can rearrange it to y(1−xz)=x+z. Since xz=1, we can write y=1−xzx+z.
This expression for y is reminiscent of the tangent addition formula: tan(α+β)=1−tanαtanβtanα+tanβ. Let x=tanα and z=tanβ. Then y=tan(α+β). The condition xz=1 ensures that tanαtanβ=1, which means α+β=2π+kπ for any integer k, ensuring tan(α+β) is well-defined.
The expression to maximize is E=1+x22−1+y22+1+z23. Using the identity 1+tan2θ=sec2θ, we have 1+tan2θ1=cos2θ. Substituting x=tanα, y=tan(α+β), and z=tanβ: E=2cos2α−2cos2(α+β)+3cos2β.
Using the identity cos2θ=21+cos(2θ): E=2(21+cos(2α))−2(21+cos(2(α+β)))+3(21+cos(2β)) E=(1+cos(2α))−(1+cos(2α+2β))+23(1+cos(2β)) E=1+cos(2α)−1−cos(2α+2β)+23+23cos(2β) E=cos(2α)−cos(2α+2β)+23+23cos(2β).
Let A=2α and B=2β. The expression becomes: E=23+cosA+23cosB−cos(A+B).
To find the maximum value, we can analyze this expression. Consider the case when β=kπ for some integer k. This implies z=tan(kπ)=0. If z=0, the original equation becomes x(0)+x+0=y, so y=x. The expression E becomes: E=1+x22−1+x22+1+023=0+3=3. This value is attained for any real x when z=0.
Let's verify this with the trigonometric form. If β=kπ, then B=2β=2kπ. E=23+cosA+23cos(2kπ)−cos(A+2kπ) E=23+cosA+23(1)−cosA E=23+23=3.
The greatest value of the expression is 3. We are given that the greatest value is qp, where p and q are relatively prime. So, qp=3=13. This means p=3 and q=1. They are relatively prime. We need to find the value of (p−q). p−q=3−1=2.