(Subscript[r, in])=(Subscript[r, out]) (Tank Steady)

Clear[rIn,cIn,rOut,V0,V,A0,A];(* Clear all variables *)

rIn=4;cIn=(1/2);
rOut=4;

V0=400;
V[t_]:=V0+(rIn-rOut)t;

A0=40;

Expand@DSolve[
{A'[t]==rIn cIn-(rOut/(V[t]))A[t],A[0]==A0},
A[t],
t
]

AEquil=V0*cIn;(*concentration approaches cIn in the limit*)
Plot[
{200-160 (E^(-t/100)),AEquil},
{t,0,500},
PlotRange->{0,AEquil*(1.1)},
PlotLabels->{"A(t)","AEquil"}
]

(Subscript[r, in])<(Subscript[r, out]) (Tank Drains)

We allow (Subscript[r, out]) to vary, as long as (Subscript[r, out])>(Subscript[r, in])=4

Clear[V,V0,A0,rIn,cIn,rOut,r];

rIn=4;cIn=(1/2);

V0=400;
V[t_]:=V0+(rIn-rOut)t;

A0=40;



FullSimplify@DSolve[
{A'[t]==rIn*cIn-(rOut/(V[t]))A[t],A[0]==A0},
A[t],
t
]

(* Defining this to allow for variable r *)
AEmpty[t_,rOut_]:=(1/2) (-400+(-4+rOut) t) (-1+(((-1))^(-(4/(-4+rOut)))) (2^(2-(16/(-4+rOut)))) (5^((4+rOut)/(4-rOut))) (((-400+(-4+rOut) t))^(4/(-4+rOut))));

(* Time tEmpty when the tank is empty *)
Clear@tEmpty
tEmpty[rOut_]:=(V0/(rOut-rIn));

Manipulate[
Plot[
{AEmpty[t,r],200},
{t,0,tEmpty[r]},
PlotRange->{{0,1000},{0,220}},
PlotLegends->{"A(t)"}
],
{{r,6},4.05,6,0.05}
]

(Subscript[r, in])>(Subscript[r, out]) (Tank Fills)

Now we allow (Subscript[r, in]) to vary, as long as (Subscript[r, in])>(Subscript[r, out])=4

Clear[V,V0,A0,rIn,cIn,rOut,r];

cIn=(1/2);

rOut=4;
V0=400;
V[t_]:=V0+(rIn-rOut)t;

A0=40; (* (Subscript[A, 0]) *)

VMax=600;(* Capacity of tank *)

FullSimplify@DSolve[
{A'[t]==rIn*cIn-(rOut/(V[t]))A[t],A[0]==A0},
A[t],
t
]

(* Defining this to allow for variable r *)
AFull[t_,rIn_]:=(1/2) (((400+(-4+rIn) t))^(-(4/(-4+rIn)))) ((2^((4 rIn)/(-4+rIn))) (5^((4+rIn)/(-4+rIn)))-(400^(rIn/(-4+rIn)))+(((400+(-4+rIn) t))^(rIn/(-4+rIn))));

(* Time tFull when the tank is full *)
Clear@tFull
tFull[rIn_]:=((VMax-V0)/(rIn-rOut));

AMax[rIn_]:=AFull[tFull[rIn],rIn];

Manipulate[
Plot[
{AFull[t,rIn],AMax[rIn]},
{t,0,tFull[rIn]},
PlotRange->{{0,1000},{0,400}},
PlotLegends->{"A(t)"}],
{{rIn,6},4.05,6,0.05}
]