# Different solution from textbook regarding exact ODE

I'm currently using the textbook Advanced Engineering Mathematics 10e (Kreyszig, 2019) and had a question regarding one of the example problems for exact ordinary differential equations.

Here's the question:

Solve the initial value problem:

$$(\cos{y}\sinh{x} + 1)dx - \sin{y}\cosh{x}dy = 0$$

$$y(1) = 2$$

I followed the textbook approach by following the steps provided for solving exact ODE's, but am getting a different result and one part of the solution is confusing me.

My approach

\begin{align} M(x, y) & = \cos(y)\sinh(x) + 1 \\ N(x, y) & = \sin(y)\cosh(x) \end{align}

$$\partial M / \partial y = \partial N / \partial x$$

\begin{align} u & = \int (\cos(y)\sinh(x) + 1 )dx + k(y) \\ & = \cos(y)\cosh(x) + k(y) \\ \frac{\partial u}{\partial y} & = -\sin(y)\cosh(x) + k'(y) \\ & = N(x, y) \end{align}

After solving the last part, it can be shown that $$k'(y) = 0$$ and so I wrote $$k(y) = C$$. However, the solution states that $$k(y) = x + C$$. I understand that this also makes sense, but how should I know when to put the $$x$$ there and when not?

• $k'(y) = 0$ means $k$'s derivative w.r.t. $y$ as a function of $y$. Does not say anything about how $k$ would vary w.r.t. $x$. Due to linearity of ODE:s any additive function of $x$ could potentially do. Maybe a little more investigation is needed to determine that exactly $x$ is this function of x that will do. Commented Oct 12, 2019 at 13:14

The integral in your solution has a $$+1$$ which you ignored to integrate . That is why you lost the $$x$$ in your answer.