I solved my 1st order differntial equation using the below commands
ode = diff(y) == t+2y;
cond = y(0) == 1;
ySol(t) = dsolve(ode,cond)
After this I have got my solution. Now my problem is I need to assign ySoln(t)=1 , to convert this equation to algebric one and solve for t.
I dont know how to assign a symfun to 1.