Guest User

Untitled

a guest
Nov 22nd, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. f = x' + mx + 7y
  2. SymbolicDerivative[f,x] = x'' + mx'
  3.  
  4. f=Dt[x]+m x+7 y
  5. Dt[f] /. {Dt[m] -> 0, Dt[y] -> 0}
  6. (* output -> m Dt[x] + Dt[Dt[x]] *)
  7.  
  8. symD[f_, x_] := Module[{y, r},
  9. r = Dt[f];
  10. y = #[[1 ;; -2]] & /@ Position[r, Dt];
  11. y = Part[r, Sequence @@ #] & /@ y;
  12. y = DeleteDuplicates[Pick[y, Length[#] == 1 & /@ Dimensions /@ y]];
  13. y = Select[y, Not[#[[1]] === x] &];
  14. y = # -> 0 & /@ y;
  15. r /. y]
Add Comment
Please, Sign In to add comment