Solving coupled system of second order differential equations symbolically
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Luke Weston
am 2 Nov. 2021
Beantwortet: Bjorn Gustavsson
am 2 Nov. 2021
Hey, I am performing an analysis of the wilberforce pendulum, and was wondering if there is a way to solve coupled second order differential equations symbolically. I have browsed around some other questions, but they all seem to be numeric solutions, with the program spitting out a graph, while I am looking for equations for y and z motion. My equations of motion are: (with all derivatives being with respect to time) y'' = k/m * y + w/m * z, z'' = J/I * z + w/I * y, where k, m, w, J, and I are constants.
0 Kommentare
Akzeptierte Antwort
Bjorn Gustavsson
am 2 Nov. 2021
Like the Greek godess used to say: Just do it!:
y'' = k/m * y + w/m * z, z'' = J/I * z + w/I * y,
syms t
syms y(t) z(t)
syms k m w J I
odes = [diff(y,2)==k/m*y+w/m*z;diff(z,2)==J/I*z+w/I*y];
qwe = dsolve(odes);
pretty(qwe.y)
pretty(qwe.z)
wilberforce_y = matlabFunction(qwe.y);
wilberforce_z = matlabFunction(qwe.z);
You will have to set a couple of constants fo start off from your desired initial conditions - or specify them at the call of dsolve.
HTH
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Assumptions finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!