how to solve this differential equation system symbolically?
Ältere Kommentare anzeigen
Akzeptierte Antwort
Weitere Antworten (1)
Walter Roberson
am 1 Mai 2022
0 Stimmen
Create the symbols and the two equations. dsolve() the pair of equations without boundary conditions, getting out a struct with a definition for x and y. Take the y and substitute t = 0 to get y(0) and equate that to the known value. Take the y and differentiate and substitute t = 0 to get y'(0) and equate that to the known value. You now have a pair of simultaneous equations relating the constants of the differential equations.
6 Kommentare
John D'Errico
am 1 Mai 2022
Bearbeitet: John D'Errico
am 1 Mai 2022
You cannot solve the problem if f(t) is unknown. Or perhaps I should say, if at least one of f(t) or x(t) are not known. In fact, dsolve will tell you the problem is insufficiently determined.
You cannot solve the problem if f(t) is unknown
Oh?
syms y(t) x(t) f(t)
dy = diff(y);
E1 = x + dy == f;
E2 = diff(x) + y == diff(f);
sol = dsolve(E1, E2)
you can now proceed as I described to find the values of C1 and C2, leading you to x(t) and y(t) expressions in terms of exp()'s and f(t)
Walter Roberson
am 2 Mai 2022
dsolve() looks for derivatives. Any function that only occurs "plain", with no derivative of the function, is treated sort of like a constant
Walter Roberson
am 3 Mai 2022
Good question. I wonder if it used symvar or equivalent and choose the first two. I seem to recall that solve() chooses variables starting from x y z (or X Y Z) first
Kategorien
Mehr zu Symbolic Math Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
