I currently have a large system autonomous differential equations. I've indexed a more managable dummy system of identical form, using Part
to reference each individual equation, so:
eqns = {c1' == -kf*c1 + kr*c2, c2 == kf*z1 - kr*z2 - kf*c2, c3' == kp*c2}
with each LHS denoted cn'
where n ranges from 0 to 3 (or the # of equations). Inputting eqns[[1]]
yields:
c1' == -a kf + b kr
Whereas inputting FullSimplify @ eqns[[1]]
yields kf c1 + c1' == kr c2
.
Does anyone know a way to specify that the format ought be maintained, ie.
Some Input
which would isolate c1' in the FullSimplify
term, or yield c1' == kr c2 - kf c1
This sounds petty and is in this dummy example, but isn't for larger systems.
Thank you in advance.
Edit:
I've spent awhile digging around online and in the help to no avail other than possibly changing my notation format, which would render my future use of NDSolve, where I hope to use the shorthand of eqns
, problematic given Mathematica's understanding of prime notation for derivatives. (Also, another complication in changing the LHS notation of c1', ..., cn'
is in that each is an implicit (rather than explicit) function of (t) (see my attached link in line 1), and so in NDSolve each cn'
and cn
must be appended with a [t]
on the end at some point in the NDSolve
function.
Map[yourFunc, eqns, {2}]
fulfill your need? To preserve the format, you may apply your simplify function on LHS and RHS separately. $\endgroup$yourFunc
can beFullSimplify
. It will apply on both RHS and LHS, but won't make actually difference on LHS. $\endgroup$