2 replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
source | link

As a piggy back onto Sjoerd's solutionSjoerd's solution, here's a solution that will give you Solve like answers with the conditions still attached:

Block[{Solve, conds},
 Unprotect[Solve];
 Solve[e_, v_] :=
  With[{res = Reduce[e, v]},

   (* capture the conditiions via a side-effect *)
   conds = res /. Equal[var_?(MemberQ[Flatten[{v}], #] &), __] :> Sequence[];

   {
    Cases[res, 
          var_?(MemberQ[Flatten[{v}], #] &) == rhs_ :> Rule[var, rhs], 
          Infinity
   ]
  }
 ];
 Transpose[{
    DSolve[u'[t] == u[t]/(4 + u[t]^2), u[t], t][[1]], 
    List @@ LogicalExpand[conds]
 }]
]

(* 
{{u[t] -> -2*
  some obscene condition},
  ...
 }
*)

But, it also produces this message:

enter image description here

which could be removed with Quiet, but I left it in as I don't think it is as bad as the Solve one. Also, I used Block instead of Internal`InheritedBlock as we are completely replacing the behavior of Solve with something else.

As a piggy back onto Sjoerd's solution, here's a solution that will give you Solve like answers with the conditions still attached:

Block[{Solve, conds},
 Unprotect[Solve];
 Solve[e_, v_] :=
  With[{res = Reduce[e, v]},

   (* capture the conditiions via a side-effect *)
   conds = res /. Equal[var_?(MemberQ[Flatten[{v}], #] &), __] :> Sequence[];

   {
    Cases[res, 
          var_?(MemberQ[Flatten[{v}], #] &) == rhs_ :> Rule[var, rhs], 
          Infinity
   ]
  }
 ];
 Transpose[{
    DSolve[u'[t] == u[t]/(4 + u[t]^2), u[t], t][[1]], 
    List @@ LogicalExpand[conds]
 }]
]

(* 
{{u[t] -> -2*
  some obscene condition},
  ...
 }
*)

But, it also produces this message:

enter image description here

which could be removed with Quiet, but I left it in as I don't think it is as bad as the Solve one. Also, I used Block instead of Internal`InheritedBlock as we are completely replacing the behavior of Solve with something else.

As a piggy back onto Sjoerd's solution, here's a solution that will give you Solve like answers with the conditions still attached:

Block[{Solve, conds},
 Unprotect[Solve];
 Solve[e_, v_] :=
  With[{res = Reduce[e, v]},

   (* capture the conditiions via a side-effect *)
   conds = res /. Equal[var_?(MemberQ[Flatten[{v}], #] &), __] :> Sequence[];

   {
    Cases[res, 
          var_?(MemberQ[Flatten[{v}], #] &) == rhs_ :> Rule[var, rhs], 
          Infinity
   ]
  }
 ];
 Transpose[{
    DSolve[u'[t] == u[t]/(4 + u[t]^2), u[t], t][[1]], 
    List @@ LogicalExpand[conds]
 }]
]

(* 
{{u[t] -> -2*
  some obscene condition},
  ...
 }
*)

But, it also produces this message:

enter image description here

which could be removed with Quiet, but I left it in as I don't think it is as bad as the Solve one. Also, I used Block instead of Internal`InheritedBlock as we are completely replacing the behavior of Solve with something else.

1
source | link

As a piggy back onto Sjoerd's solution, here's a solution that will give you Solve like answers with the conditions still attached:

Block[{Solve, conds},
 Unprotect[Solve];
 Solve[e_, v_] :=
  With[{res = Reduce[e, v]},

   (* capture the conditiions via a side-effect *)
   conds = res /. Equal[var_?(MemberQ[Flatten[{v}], #] &), __] :> Sequence[];

   {
    Cases[res, 
          var_?(MemberQ[Flatten[{v}], #] &) == rhs_ :> Rule[var, rhs], 
          Infinity
   ]
  }
 ];
 Transpose[{
    DSolve[u'[t] == u[t]/(4 + u[t]^2), u[t], t][[1]], 
    List @@ LogicalExpand[conds]
 }]
]

(* 
{{u[t] -> -2*
  some obscene condition},
  ...
 }
*)

But, it also produces this message:

enter image description here

which could be removed with Quiet, but I left it in as I don't think it is as bad as the Solve one. Also, I used Block instead of Internal`InheritedBlock as we are completely replacing the behavior of Solve with something else.