Hello to all, my doubts I have is like entering the following differential equation in mathematica, I already is that I use the DSolve command but I do not understand how enter dx, thanks in advance. Here is the equation
If you divide by dy it becomes (5 x(y) + 4 y) \frac{dx}{dy}+(4 x(y)+ 8 y^3) = 0. So the dependent variable is x and the independent variable is y, hence
If y was the dependent variable and x is the independent variable, then dividing by dx gives the ode (5 x + 4 y(x))+(4 x+ 8 y^3(x)) \frac{dy}{dx} = 0 and now you write
ode = (5 x + 4 y[x]) + (4 x + 8 y[x]^3) y'[x] == 0;
DSolve[ode, y[x], x]
Thank you very much Nasser by your very detailed explanation, the second option is my case ,where x is the independent variable, is just what i needed. Thanks again.
Hello again, I am still having problems with Mathematica to solve my differential equation, the problem is that I get a solution very complex and long, on the other hand, the solution that i get to do this by hand is shorter, my question is, i’m very bad in the version made by hand, or i am inserting bad parameters in Mathematica, i hope someone can give me clarify these points, greetings to all of the community
My Spanish is zero, but the ordinary differential equation is exact. Your lecturer did not solve for y(x) but for the potential function f(x,y). The ordinary differential equation is the total differential of f:
In[4]:= (D[#, x] DifferentialD[x] + D[#, y] DifferentialD[y]) &[5 x^2/2 + 4 x y - 2 y^4]
Out[4]= (5 x + 4 y) \[DifferentialD]x + (4 x - 8 y^3) \[DifferentialD]y
Please note that differentiation for x did not produce terms \frac{dy}{dx}.
By the way, you committed a mistake citing it as
Udo thank you very much for helping me in this stage of confusion, but I am still confused, my question is, should I enter in Mathematica the differential equation in question as you have suggested above, or do I have to do anything different, because if I do the following steps i get a very long and also very complicated
ode = (5 x + 4 y[x]) + (4 x - 8 y[x]^3) y'[x] == 0;
DSolve[ode, y[x], x]
with respect to the error of such as cite the equation, i realized after having published my doubt in the community but thanks for reminding me, Is there any way to obtain some more compact solution?, although it is like the one that my teacher gave
Hi Luis, just take a step back and consider x and y as independent variables (i.e. noty=y(x)). Then search for a new function f=f(x,y), the so-called potential function with the property that the total differential of f gives the differential equation back: \begin{equation}df=\frac{\partial f}{\partial x} dx+\frac{\partial f}{\partial y} dy = (5x+4y)dx+(4x-8y^3)dy\end{equation}=0. To do this one solves a partial differential equation system for f in x and y
In[1]:= DSolve[{D[f[x, y], x] == 5 x + 4 y, D[f[x , y], y] == 4 x - 8 y^3}, f, {x, y}]
Out[1]= {{f -> Function[{x, y}, (5 x^2)/2 + 4 x y - 2 y^4 + C[1]]}}
which gives clearly your lecturer’s solution.
The constant C[1] does not matter, because it disappears under the total differential of f.