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'' + 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 = -cos(2x)
and find the particular solution due to the new 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.
Note that the term -cos(2x) does not cause resonance here,
because its frequency is 2

please post picture of graph in PDF file.thanks

Homework Answers

Answer #1

c)

%% Matlab code

format long
x=linspace(0,10,100);
yh=cos(x)+sin(x);
yp=1/3*cos(2*x);

figure;
plot(x,yh);
hold on
plot(x,yp);
hold on
plot(x,yp+yh)
xlabel('x');
grid on
legend('Homogenous solution','perticular solution','Complete solution');


OUTPUT:

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'' + 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'' +...
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...
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...
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...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT