I have the following differential equation:
$$P_0-P_n = \int_0^L f(x,P(x),Q)\,dx$$
In practice, $P_0$ is the pressure at the start of a pipe $(x=0)$, $P_n$ is the pressure at the end $(x=L)$, and $Q$ is the flow rate. $L$ is the length of the pipe and $x$ the distance from the beginning. Given any two of $P_0$, $P_n$, $Q$, the third may be calculated by solving the above equation. In practice, I fix $Q$ and one of the pressures and calculate the other using an ODE solver. During this process I also evaluate $\frac{\partial P_n}{\partial Q}$ and $\frac{\partial P_n}{\partial P_0}$ (or $\frac{\partial P_0}{\partial Q}$ and $\frac{\partial P_0}{\partial P_n}$, depending on which pressure I fix)
The key thing I need to find is the equation of the tangent plane at the solution $(P_0^*$, $P_n^*$, $Q^*)$, something like $AP_0 + BP_n + CQ + D = 0$, where $A,B,C,D$ are related somehow to the partial derivatives $\frac{\partial P_0}{\partial Q}$, $\frac{\partial Q}{\partial P_0}$, $\frac{\partial P_0}{\partial P_n}$, $\frac{\partial Q}{\partial P_n}$, $\frac{\partial P_n}{\partial Q}$ and $\frac{\partial P_n}{\partial P_0}$.
How do I find $A,B,C,D$ ? And if I need the other partial derivatives I don't have, how do I get these from the ones I already have?
You have given some relation $$ P_n=F(P_0,Q) $$ that can be solved also for the other variables. At some point where $P_0=P_0^*$, $Q=Q^*$ and $P_n^*=F(P_0^*,Q^*)$ the linearization or tangent plane is given as $$ P_n-P_n^*= \frac{∂F}{∂P_0}(P_0^*,Q^*)\cdot(P_0- P_0^*)+\frac{∂F}{∂Q}(P_0^*,Q^*)\cdot(Q- Q^*) $$ which can also be written as $$ P_n-P_n^*= \left(\frac{∂P_n}{∂P_0}\right)_Q⋅(P_0- P_0^*)+\left(\frac{∂P_n}{∂Q}\right)_{P_0}⋅(Q- Q^*) $$
Be aware however that a round trip through the partial derivatives has a counter-intuitive result, as $$ \left(\frac{∂P_n}{∂P_0}\right)_Q⋅\left(\frac{∂P_0}{∂Q}\right)_{P_n}⋅\left(\frac{∂Q}{∂P_n}\right)_{P_0}=-1. $$