I'm struggling to find a way to switch from a symbolic declaration of the differential operator to its implementation
I give you an example.
F: (10-'diff(x(t),t)^2 -2*x(t)*'diff(x(t),t) -5*x(t)^2)*%e^(-t);
E: ratsimp(diff(F, x(t)) - diff(diff(F, 'diff(x(t),t)), t));
sol: ode2(E, x(t), t);
sol: ev(sol, [%k1 = C1, %k2=C2]);
trans_cond: diff(F, 'diff(x(t), t));
trans_cond: ev(trans_cond, sol);
trans_cond: at(trans_cond, [t=1]);
The corresponding output maintains the symbolic notation whereas I would like to evaluate the diff() obtained after the last substitution.
Giving the result:
% 4*C1-C2^(-2)
Another solution. The
nouns
option forev
causes the evaluation of symbolic derivatives, and also any other noun expressions such as symbolic integrals, symbolic summations, etc.A shorter form of
ev(..., nouns)
is recognized by the interactive console. You can input..., nouns
instead.Here is
ev(..., nouns)
applied to symbolic integral:and here, to a symbolic summation: