I have to solve the task about mathematical pendulum.
And I have formula:
x’‘(t)+g/k*sin(x(t))=0, where x - angle of pendulum.
And for solve this we have
x(t=0) = 0, x’(t=0) = a
Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information. >>
DSolve::bvfail: For some branches of the general solution, unable to solve the conditions. >>
DSolve::bvfail: For some branches of the general solution, unable to solve the conditions. >>
I have spend several hours, but with no result…
Please, help me to understand - what happens…
Hello and welcome to the Wolfram Community! Your code is missing some parts. Please take a few minutes to read this tutorial about correct posting especially of Mathematica code:
If you will not follow the tutorial, other members of community may not be able to test your code. To edit your post click Edit in the lower right corner of your post.
This takes what you have already written and makes a few very small changes.
Will this provide the solution that you need?
NDSolve requires that all parameters be given constant numeric values.
Thank you for this tip Frank, I suspected that there exists more right way).
I doesn’t fully understand this single string, but it shows me ways, where I can find gold in future
Another approach, if you’re using NDSolve repeatedly, and only changing one or more parameters each time, is to use ParametricNDSolve, to set up the problem.
That avoid repeating the setup each time.