In: Mechanical Engineering
The following equation describes a certain dilution process, where y(t) is the concentration of salt in a tank of freshwater to which salt brine is being added.
Suppose that y(0) = 0. Plot y(t) for 0 ≤ t ≤ 10.
Let y(t) be the concentration of salt in a tank.
The dilution process is governed by the equation
dt/dt + 2/(10 + 2t)y = 4 and y(0) = 0
Solve this equation using ‘ode45’ command and function file called ‘conc’, which contains the first order derivative of concentration expression.
Plot the variation of concentration of salt with time.
Mat-lab code for Required problem is provided below.
Save this program as ‘problem7_29.m’.
% Concentration of salt in a tank of fresh water
[t,y] = ode45(@conc, [0,10],0);
plot(t,y);
xlabel(\'Time(Sec)\');
ylabel(\'Concentration\');
title(\'Salt brine concentration after adding for 10s\');
Save the function file as ‘conc.m’.
function ydot = conc(t,y)
ydot = 4 - (2/(10+2*t))*y;
The output of the code ‘Required problem’ in the figure window is shown below.
Let y(t) be the concentration of salt in a tank.
The dilution process is governed by the equation
dt/dt + 2/(10 + 2t)y = 4 and y(0) =