# Solving differential equation $(3t-x) \ dt + (3x-t) \ dx = 0$

I am asked the following problem:

Solve differential equation $(3t-x) \ dt + (3x-t) \ dx = 0$.

By noticing that it was an exact differential equation, I did the following:

\frac{\partial P}{\partial t} = \frac{\partial Q}{\partial x} = -1\\ \\ \begin{cases} F_x &= 3t-x\\ F_y &= 3x - t \end{cases} \\ \begin{cases} F &= 3tx-\frac{x^2}{2} + g(t)\\ F &= 3tx - \frac{t^2}{2} + h(x) \end{cases} \\ \begin{align*} g(t) &= - \frac{t^2}{2}\\ h(x) &= - \frac{x^2}{2} \end{align*} \\ \therefore \quad 3tx-\frac{t^2}{2}-\frac{x^2}{2}=C

The problem was comparing my answers with the textbook's. Is my answer wrong? Did I make a mistake somewhere?

Textbook's answer $3t^2-2xt+3x^2 = C$

Thank you.

• In fact, $F_t=3t-x$, $F_x=3x-t$. Commented Sep 11, 2016 at 17:55

$$(3t-x)dt+(3x-t)dx=0\\ 3\left( tdt+xdx \right) -\left( xdt+tdx \right) =0\\ \frac { 3 }{ 2 } d\left( { t }^{ 2 }+{ x }^{ 2 } \right) -d\left( xt \right) =0\\ 3\left( { t }^{ 2 }+{ x }^{ 2 } \right) -2xt=C$$
$$(3t-x) \ dt + (3x-t) \ dx = 3tdt-xdt+3xdx-tdx=0$$ $$3tdt+3xdx=xdt+tdx$$ $$3(tdt+xdx)=(xt)'$$