Problems from Exact ordinary differential equations

Solve the following equation: $$(3y+e^x)dx+(3x+\cos y) dy=0$$

See development and solution

Development:

Let's verify that it is an exact ODE. Calling $$$P(x,y)=3y+e^x$$$ $$$Q(x,y)=3x+\cos(y)$$$ we have to verify that $$P_y=Q_x$$. In effect: $$$P_y=3 \ \ \ Q_x=3$$$ We know that $$$U_x=P=3y+e^x \Rightarrow U(x,y)=\int (3y+e^x) dx+h(y)=3y\cdot x+e^x+h(y)$$$ Therefore, we only need to calculate the function $$h(y)$$. Let's impose that the obtained $$U$$ satisfies that $$U_y=Q$$: $$$\left . \begin {array} {l} U_y=3x+h'(y) \\ U_y=Q=3x+\cos(y) \end{array}\right\} \Rightarrow h'(y)=\cos(y) \Rightarrow h(y)=\sin(y)$$$ Therefore the solution of the exact ODE is: $$$U(x,y)=3x\cdot y+e^x+\sin(y)=C, \ C\in\mathbb{R}$$$

Solution:

$$U(x,y)=3x\cdot y+e^x+\sin(y)=C, \ C\in\mathbb{R}$$

Hide solution and development
View theory