0
ClearAll["Global`*"]
y[t_] = (x[t])^2;
T[t_] = 1/2 * ((x'[t])^2 +(y'[t])^2) * m;
h[t_] = y[t];
U[t_] = -(m * g * h[t]);
L = T[t] - U[t];
equation[t] = D[#1, #2] - D[D[#1, #3], t] &  [L, x[t], x'[t]];
xSolved[t] = DSolve[{equation[t] == 0, x[0] == -5, x'[0]==10}, x[t], t]

I just don't see it. The equation is properly calculated, the initial conditions are also correct. I don't know what's going on

anon
  • 163
  • 4
  • I do not get the warning message in the title. I am in version 12.3, and if I restart my kernel using Quit[] and then run OP's code, I get some other messages, starting with: Inverse functions are being used by Solve, so some solutions may not be found... – user293787 Oct 15 '22 at 19:22
  • @user293787 Ok, now I get it, too. But what does this inverse function error mean? – anon Oct 15 '22 at 20:44
  • @MichaelE2 It's not a duplicate as the link you sent here does not solve my problem at all. – anon Oct 15 '22 at 21:25
  • As someone else commented, your code does not produce False in the first argument. So it seems you do not have that problem at all. Can you post code that produces the problem? – Michael E2 Oct 16 '22 at 00:21
  • I have not investigated the problem further. Maybe DSolve cannot solve the equation in this generality (or not without a bit of help) and one must use NDSolve. I assume the question was closed because the problem you had originally (and which is still the title of your question...) does in fact look like a duplicate. Edit: Just saw this new equation by OP. – user293787 Oct 16 '22 at 03:16

0 Answers0