Question: % Define the symbolic variable ' syms ' ^ { t } ^ y ( t ) % Define the differential equation ode = diff

% Define the symbolic variable
'syms'^{t}^y(t)
% Define the differential equation
ode = diff(y, t)- y ==2*t^2- t -5;
% Define the initial conditions
initial_conditions =[y(1)==3, y(0)==0];
% Solve the differential equation with initial conditions
sol = dsolve(ode, initial_conditions);
% Generate a range of time values for plotting
t_values = linspace(-2,2,100);
% Substitute the time values into the solution
y_values = subs(sol, t, t_values);
% Plot the solution
figure;
plot(t_values, y_values, 'LineWidth', 2);
xlabel('Time (t)');
ylabel('y(t)');
title('Solution of y''- y =2t^2- t -5');
ylim([-151010]); % Set y-axis limits
legend('y(t)');
grid on;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!