# Density plot and differential equation

I have to solve a two coupled differential equations with two parameters. Then I need to make a density plot for a specific value of time. Find the code below

Clear[sol];
sol = ParametricNDSolveValue[{y'[t] == a*Cos[t] + b*Sin[t], z'[t]==a*Tan[t]+b*Sin[t]
,y == 1,z==0}, {y,z}, {t, 1, 10}, {a, b}];
Block[{t = 1}, DensityPlot[y[t]/.sol[a, b]@t, {a, 1, 5}, {b, 1, 5}]]


I tried doing it like the above mentioned way. I used the suggestion from one of the user here in stack exchange. I did not succeed when I tried to modify it

We can use ParametricNDSolve and set {t, 0, 1}

Clear[sol];
sol = ParametricNDSolve[{y'[t] == a*Cos[t] + b*Sin[t],
z'[t] == a*Tan[t] + b*Sin[t], y == 1, z == 0}, {y, z}, {t,
0, 1}, {a, b}];
Block[{t = 1}, DensityPlot[y[a, b][t] /. sol, {a, 1, 5}, {b, 1, 5}]] Try

sol = ParametricNDSolveValue[{y'[t] == a*Cos[t] + b*Sin[t],
z'[t] == a*Tan[t] + b*Sin[t], y == 1, z == 0}, {y, z}, {t,
1, 10}, {a, b}];
DensityPlot[ sol[a, b][], {a, 1, 5}, {b, 1, 5}]