Solve symbolic equation with derivatives

I want to solve an equation with the symbolic math toolbox. This equation also contains derivatives. E.g.:
eqn1 = 0 == x + y + diff(f(t),t)
sol1 = solve(eqn1, diff(f(t),t));
But I always get an empty structure as solution. Is there any way to do this or do I have to convert the diff(f(t),t) into another symbolic variable and convert it back to the derivative after I solved the equation?

 Accepted Answer

isolate(eqn,expr)
is the function I was looking for.

More Answers (1)

dsolve(...) is the one to be used for odes.

4 Comments

I acutally don't want to solve the ode as is, I want to solve the equation in a way, that I can reuse it in another equation. Meaning, that I express x from eqn1 and enter x into eqn2 and so on. After some steps I have the ode which I can possibly solve.
syms x y df
% df -> diff(f(t),t)
eqn1 = 0 == x + y + df
sol1 = solve(eqn1, df)
doc subs
Yeah, this is the workaround I was thinkin of but I'd have prefered a built in way rather than defining loads of symbolics.

Sign in to comment.

Categories

Find more on Mathematics in Help Center and File Exchange

Products

Release

R2020a

Asked:

on 4 Jun 2020

Answered:

on 10 Jun 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!