Question

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'' + 3y' + 2y = 12x
and find the particular solution due to the linear term.
c) To see the effect of this term, graph the full solution
on the same set of axes using a solid line of a different color.

please post picture in PDF file. thanks

Homework Answers

Answer #1

%%% Matlab code

%%% Here variable is t not x .. don't confuse

clc;
clear all;
close all;
%%%%(a)
syms y(t)
eqn = diff(y,t,2) +3*diff(y)+2*y == 0;
ySol(t) = dsolve(eqn);
disp('Homogenous solution is : ');
disp(ySol);
C1=1;
C2=1;
yh=@(t) C1*exp(-2*t) + C2*exp(-t);

%%%% (b)
syms y(t)
eqn = diff(y,t,2) +3*diff(y)+2*y == 12*t;
ySol(t) = dsolve(eqn);
disp('Complete solution is : ');
disp(ySol);
C3=1;
C4=1;
yc=6*t + C3*exp(-2*t) + C4*exp(-t) - 9
fplot(yh,[0 10]);
hold on
fplot(yc,[0 10]);
grid on
xlabel('x');
legend('Homogenous solution','Complete solution');

OUTPUT:

Homogenous solution is :
C1*exp(-2*t) + C2*exp(-t)
symbolic function inputs: t

Complete solution is :
6*t + C3*exp(-2*t) + C4*exp(-t) - 9
symbolic function inputs: 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
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 =...
Use Matlab to solve the following (a) Create a plot with a sphere at the center...
Use Matlab to solve the following (a) Create a plot with a sphere at the center of the graph (origin) representing the sun with a radius of 6955000 km. Make sure that the outside of the sphere is painted in ’autumn’ colors. (Hint: look up the sphere() function, the colormap() function, and the surf() function). (b) Create a variable t ranging from 0 to 2? with increments of 0.01. (c) The following Table gives you important values needed to compute...
2.Use separation of variables to solve (3x^2(1-y^2))/2y with initial condition y(1)=2. 3.State the solution of the...
2.Use separation of variables to solve (3x^2(1-y^2))/2y with initial condition y(1)=2. 3.State the solution of the homogeneous ODE with roots of its characteristic equation of r= 1,1,1,+-7i,3+-5i. 4.Consider the system of linear equations: 2x+6y+z=7 x+2y-z=-1 5x+7y-4z=9 solve this system using: a) Carmer's rule, b)Gauss-Jordan elimination, c) an inverse matrix.
Important Instructions: (1) λ is typed as lambda. (2) Use hyperbolic trig functions cosh(x) and sinh(x)...
Important Instructions: (1) λ is typed as lambda. (2) Use hyperbolic trig functions cosh(x) and sinh(x) instead of ex and e−x. (3) Write the functions alphabetically, so that if the solutions involve cos and sin, your answer would be Acos(x)+Bsin(x). (4) For polynomials use arbitrary constants in alphabetical order starting with highest power of x, for example, Ax2+Bx. (5) Write differential equations with leading term positive, so X′′−2X=0 rather than −X′′+2X=0. (6) Finally you need to simplify arbitrary constants. For...