Question

using “MATLAB or MAPLE ”plot the solution for the first 10 seconds. y”+4y’+4y=4cos(3t)

using “MATLAB or MAPLE ”plot the solution for the first 10 seconds. y”+4y’+4y=4cos(3t)

Homework Answers

Answer #1

MATLAB CODE for solving ODE with initial conditions and plotting solution

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clc
clear all
a=1; b=1; %%%% Intial conditions I have given randomly, one can change according to the problem requirement
ode = 'D2y +4*Dy + 4*y = 4*cos(3*t)';
initial = 'y(0)=a, Dy(0)=b';
y=dsolve(ode,initial,'t')
%%%% plotting the solution for 0<x<6
for t=0:0.01:10
plot(t,exp(-2*t)*(a+20/169)+exp(-2*t)*t*(b+2*a-8/13)-20/169*cos(3*t)+48/169*sin(3*t),'.')
hold on
end
xlabel('t seconds')
ylabel('solution y')

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

OUTPUT

y =exp(-2*t)*(a+20/169)+exp(-2*t)*t*(b+2*a-8/13)-20/169*cos(3*t)+48/169*sin(3*t)

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Find the general solution to y'' - 4y' + 3y = e^t + 3t^2 - 2t...
Find the general solution to y'' - 4y' + 3y = e^t + 3t^2 - 2t + 3
Solve using Annihilator method : y''+4y=sin(3t) with y(0)=0 and y'(0)=0
Solve using Annihilator method : y''+4y=sin(3t) with y(0)=0 and y'(0)=0
3. For each of the following equations find a particular solution yp(t). (a) y"+4y= e^(5t) (b)...
3. For each of the following equations find a particular solution yp(t). (a) y"+4y= e^(5t) (b) 4y"+4y'+y = 3t(e^t) (c) y"+4y'+2y=t^2 (d) y"+9y = cos(3t) +4sin(3t)
y'' - 4y' + 4y = (6)(e^(2t)) y(0)=y'(0)=0 Use Laplace Transforms to solve. Sketch the solution...
y'' - 4y' + 4y = (6)(e^(2t)) y(0)=y'(0)=0 Use Laplace Transforms to solve. Sketch the solution or use matlab to show the graph.
y'' + 4y' +4y = e^(-2t) y(0)=0 y'(0)=4 Use Laplace Transforms to solve. Sketch the solution...
y'' + 4y' +4y = e^(-2t) y(0)=0 y'(0)=4 Use Laplace Transforms to solve. Sketch the solution or use matlab to show the graph.
Create the following 2D plot in boxed format using MAPLE. Include a title and the code...
Create the following 2D plot in boxed format using MAPLE. Include a title and the code for the plot in the same page. - A lemniscate (3(x^2+y^2)^2)=100(x^2-y^2)
You can use dsolve in MATLAB...run simplify(...) on the solution...You should plot the homogeneous and the...
You can use dsolve in MATLAB...run simplify(...) on the solution...You should plot the homogeneous and the inhomogeneous solutions on the same graph, using the "plot" function of MATLAB. set the arbitrary constants to 1 Consider the homogeneous equation y'' + y = 0. a) Solve it and set the c's to 1. Graph this periodic solution using large dots in MATLAB. b) Now add on the right-hand side the term -cos(2x). Solve the forced harmonic oscillator y'' + y =...
You can use dsolve in MATLAB...run simplify(...) on the solution...You should plot the homogeneous and the...
You can use dsolve in MATLAB...run simplify(...) on the solution...You should plot the homogeneous and the inhomogeneous solutions on the same graph, using the "plot" function of MATLAB. set the arbitrary constants to 1 Consider the homogeneous equation y'' + 3y' + 2y = 0. a) Solve it and set the c's to 1. Graph this transient solution using large dots in MATLAB. b) Now add on the right-hand side the linear term 12x. Solve the inhomogeneous equation y'' +...
Find a solution to y^''-4y^'-5y=2e^2t using variation of parameters.
Find a solution to y^''-4y^'-5y=2e^2t using variation of parameters.
Using Matlab, evaluate ? = (? + 10) (?^5 + 1) for values of x in...
Using Matlab, evaluate ? = (? + 10) (?^5 + 1) for values of x in the range of -1 to 1 in step sizes of 0.1. Hence, plot y versus x. Could you also include the Matlab code and the associated screenshots?