1
$\begingroup$

Suppose I have a list

condition={f'[t]-3,g'[t]-f[t]}

and now I want to use DSolve on it so I need to convert the list to

eqn={f'[t]-3==0,g'[t]-f[t]==0}

I can do that manually with this short list, but is there a way to do it programmatically with long lists by append ==0 to each item in the list?

$\endgroup$
  • 1
    $\begingroup$ DSolve[Thread[condition == 0], {f[t], g[t]}, {t}] will work just fine. $\endgroup$ – Chen Stats Yu Jan 7 '15 at 16:32
5
$\begingroup$
Thread[Equal[condition, 0]]
(*
 {-3+f′[t]==0,-f[t]+g′[t]==0}
*)
| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.