syms x(t) t
eqn = diff(x,t) == cos(t)/(2*(x-1))
dsolve(eqn)
dsolve(eqn, x(0) == 3)
