0
$\begingroup$

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?

$\endgroup$
7
  • $\begingroup$ k is a function of u as it seems. u is a function of what? $\endgroup$
    – bmf
    Apr 5, 2022 at 15:28
  • 1
    $\begingroup$ 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? $\endgroup$
    – Michael E2
    Apr 5, 2022 at 15:39
  • $\begingroup$ 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. $\endgroup$
    – bmf
    Apr 5, 2022 at 15:41
  • $\begingroup$ 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. $\endgroup$
    – Michael E2
    Apr 5, 2022 at 17:52
  • $\begingroup$ Got it now, cheers! $\endgroup$ Apr 5, 2022 at 19:14

2 Answers 2

3
$\begingroup$
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].

$\endgroup$
2
$\begingroup$

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]
$\endgroup$
5
  • $\begingroup$ This seems to be incorrect as k is a function of u, which will give you a completely different equation. See the other answer. $\endgroup$
    – Dunlop
    Apr 5, 2022 at 15:15
  • 1
    $\begingroup$ @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. $\endgroup$
    – Michael E2
    Apr 5, 2022 at 15:49
  • $\begingroup$ As Dunlop sad, I used the partial derivatives only in explicit variables. $\endgroup$ Apr 5, 2022 at 17:43
  • $\begingroup$ I guess it then depends a bit on what he OP actually wanted which is somewhat ambiguous. $\endgroup$
    – Dunlop
    Apr 5, 2022 at 19:07
  • $\begingroup$ 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? $\endgroup$
    – Michael E2
    Apr 5, 2022 at 19:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.