# Solving First order ODE [closed]

I have an ODE described by

$$\frac{dk}{du} = \frac{\partial(ku-k^3)/\partial u}{V(u) - \partial(ku-k^3)/\partial k}$$

and I try to solve with

Dsolve[k'[u] == D[k*u - k^3, u]/(u - D[k*u - k^3,
k]), u, k]


But it tells me off. Why?

• k is a function of u as it seems. u is a function of what?
– bmf
Apr 5, 2022 at 15:28
• What does "it tells me off" mean? I get that it returns without solving the equation, with no messages why. Is that what you get? Apr 5, 2022 at 15:39
• In addition to the comment by @MichaelE2 the way you wrote the o.d.e is very strange. It seems that you are telling Mma that k is the independent variable and also k depends on u.
– bmf
Apr 5, 2022 at 15:41
• Apparently, I didn't notice that DSolve (capital S) was misspelled in the OP. :) Did you use Dsolve or DSolve when you ran your code? If you get error messages, please include them in the question. Tx. Apr 5, 2022 at 17:52
• Got it now, cheers! Apr 5, 2022 at 19:14

DSolve[k'[u] == D[k[u]*u - k[u]^3, u]/(u - D[k[u]*u - k[u]^3, k[u]]),
k[u], u]


This could work. The k need to be writen as k[u].

Did you try that one?

D[k*u - k^3, u]/(u - D[k*u - k^3, k]);

DSolve[k'[u] == 1/(3 k[u]), k[u], u]

• This seems to be incorrect as k is a function of u, which will give you a completely different equation. See the other answer. Apr 5, 2022 at 15:15
• @Dunlop I think this is right, if $V(u)=u$ and the partial derivatives mean what they appear to mean in the TeX in the OP. There's some ambiguity about their meaning, but treating the dependent variable as a variable happens from time to time. Think $m x''(t) = -\partial U/\partial x$ where $U$ is the potential energy, for instance. Apr 5, 2022 at 15:49
• As Dunlop sad, I used the partial derivatives only in explicit variables. Apr 5, 2022 at 17:43
• I guess it then depends a bit on what he OP actually wanted which is somewhat ambiguous. Apr 5, 2022 at 19:07
• Or even if they know what they want....I mean, what are the chances that the numerator should have been $d(ku-k^3)/du$, as in the other answer, but the denominator should be a partial derivative of the same function? Apr 5, 2022 at 19:49