solve in MATLAB and screenshot code
?′′ −??′ +??= ???(????−?????)
solve in MATLAB and screenshot code
?′′ −??′ +??= ???(????−?????)
Solutions
Expert Solution
%Please copy this code in matlab
clear all;
%Differential equation solve
syms y(x) %Defines the symbol
%Defines the function
ode=diff(y,x,2)-2*diff(y,x)+2*y==exp(1)*2*x*(cos(x)-3*sin(x));
%Solution
ySol(x)=dsolve(ode)
Solve using matlab code!!
Use the graphical method to solve
4x1 −
8x2 = −24
x1 +
6x2 = 34
Check your results by substituting them back into the
equations.(include this on the code)
Write a MATLAB code for the conjugate gradient method and apply it
to solve the system Hx = b, where H is the n×n Hilbert matrix, and
b is A times the vector of all ones, for (a) n = 4; (b) n = 8.
Compare your numerical solutions with the exact solution (which is
the vector of all ones), and report your numerical errors.
Using Matlab code, solve the following:
(a) Consider first the undamped pendulum ? + sin ? = 0, ?(0) =
0, ? (0) = b. Let x = ? and y = ? ; then x and y satisfy the system
x = y y = ? sin x, x(0) = 0 y(0) = b. Solve this system numerically
and plot, on a single graph, the resulting trajectories for the
initial velocities b = 0.5, 1, 1.5, 2, 2.5. Use...
Write your own MATLAB code to solve the system
10 − x + sin(x + y) − 1 = 0
8y − cos2 (z − y) − 1 = 0
12z + sin(z) − 1 = 0
using a residual tolerance of 10^−6 and the initial guess, ~x 0
= [0.1, 0.25, 0.08]^T . Print out the values for x, y and z for
each iteration in a table similar to the one you created for the
problems of the...
(only matlab code please)
solve and plot the relation between the position vs time where
m1= 1 kg , m2 = 1.5 kg (Mass) k1= 100 N/m , k2 = 125 N/m (spring) b
= 1 (damper) Initial conditions: y1(0) =0.15 m , y ’1(0) =0.05 m/s
y2(0) =0.05 m , y ’2(0) =0.03 m/s U1(t) = unit step starting at t
(step time) = 0 sec U2 = u (t,5) (t (step time) = 5 sec) t =
linspace(0,25)...