Would someone help me with the last 3 questions here, I got the previous ones but need help with the last 3 in red. Thank you
Transcribed:
Now that you nd a rst order system of ODEs, you can solve it
using the Huens method ac-
cording to the material you covered in computational module 2. A
template of the code which
will help you to get started is also available. Attach the complete
code as a pdf page to your
assignment. [4 marks]
Plot the result of your code y(x) in Matlab, label the axes and
the curve, attach the plot to your
assignment. [1 mark]
Explain the in uence of the initial conditions on the behaviour
of y(t). Hint: You can change
some of initial conditions in the code to nd out how this is
relevant for the behaviour of the
solution. [1 mark]
%%Matlab code for Heun's method
clear all
close all
dt=0.01;
tmax=20;
t=[0:dt:tmax];
N=length(t);
v=zeros(N,3);
v(1,:)=[0 5 -39];
A=[0 1 0;0 0 1;-12 -4 -3];
for i=2:N
K1=dt*A*(v(i-1,:))';
K2=dt*A*((v(i-1,:)+K1'))';
v(i,:)=v(i-1,:)+(K1'+K2')/2;
end
y=v(:,1);
plot(t,y,'Linewidth',2)
%Exact solution
yy=@(tt) -3*exp(-3*tt)+3*cos(2*tt)-2*sin(2*tt);
hold on
plot(t,yy(t),'--')
legend('Heun Method','Exact solution')
title('Solution of y(x) using Heun method')
xlabel('x')
ylabel('y(x)')
grid on
%%%%%%%%%%%%%%%%%% End of Code %%%%%%%%%%%%%%%%%
Would someone help me with the last 3 questions here, I got the previous ones but need help with the last 3 in red. Than...
How to do question B 2,3,4,5? 3. a) Find the solution v ote ordinary diferetinl equation with the initial coditions: b) i) Recast our third ord ODE into a system af first order ODEs af the formA.v, where v' = dv/dz f(v) and v = (y, y,y")". You should show all working to find the corresponding matrix A. Do not solve the system. 4 mark Solve it only by hand and show your complete work. Do not use a calculator...
3. a) Find the solution y(t) of the ordinary differential equation with the initial conditions: (Solve it only by hand and show your complete work. Do not use a calculator or any symbolic calu lations). [8 marks b) ) Recast our third order ODE into a system of irst order ODEs of the form A.v, where v' = dv/dr = f(v) and v = (y,y,,y")" . You should show all working to find the corresponding matrix A. Do not solve...
Use MATLAB’s ode45 command to solve the following non linear 2nd order ODE: y'' = −y' + sin(ty) where the derivatives are with respect to time. The initial conditions are y(0) = 1 and y ' (0) = 0. Include your MATLAB code and correctly labelled plot (for 0 ≤ t ≤ 30). Describe the behaviour of the solution. Under certain conditions the following system of ODEs models fluid turbulence over time: dx / dt = σ(y − x) dy...
The position x of a mass m attached to a spring obeys the differential equation i + yi + w?x = 0 where y 2w. a) (2 marks) Write down expressions for the forces on the mass due to (i) the spring, and (ii) damping. (3 marks) Using a trial solution x = Ae"', show that a = --y/2 ± (y2/4 - «2)1/2 b) c) (4 marks) Show, by finding wd, that the solution is a damped oscillation of the...
Questions and answers are here, need solution process. 3. a) For the circuit shown in Figure Q3 (a): i) Find the mathematical expression for the transient behaviour of the voltage 6 vc across the capacitor and the current ic when the switch is moved into position 1 at t- 0 s ii) Find the mathematical expression for the response of vc and ic if the switch 4 is moved into position 2 at t charging phase) τ (where τ is...
(b) . Write the k-th step of the trapezoidal method as a root-finding problem Ğ = is Y+1 where the unknown (e)Find the Jacobian matrix of the vector function from the previous part. (dWrite a function in its own file with definition [Y] dampedPendulum(L, T) function alpha, beta, d, h, that approximates the solution to the equivalent system you derived in part (a) with L: the length of the pendulum string alpha: the initial displacement beta: the initial velocity d:...
using matlab thank you 3 MARKS QUESTION 3 Background The van der Pol equation is a 2nd-order ODE that describes self-sustaining oscillations in which energy is withdrawn from large oscillations and fed into the small oscillations. This equation typically models electronic circuits containing vacuum tubes. The van der Pol equation is: dt2 dt where y represents the position coordinate, t is time, and u is a damping coefficient The 2nd-order ODE can be solved as a set of 1st-order ODEs,...
I need help with the matlab code, thank you. The purpose of this assignment is to illustrate one important difference between linear and nonlinear models of oscillating systems. In an undamped, unforced linear system, the period of a periodic solution depends only on system parameters and not on the initial conditions, but in a nonlinear system the period can depend on the initial conditions Consider the following nonlinear differential equation, which models the free, undamped motion of a block attached...
write MATLAB scripts to solve differential equations. Computing 1: ELE1053 Project 3E:Solving Differential Equations Project Principle Objective: Write MATLAB scripts to solve differential equations. Implementation: MatLab is an ideal environment for solving differential equations. Differential equations are a vital tool used by engineers to model, study and make predictions about the behavior of complex systems. It not only allows you to solve complex equations and systems of equations it also allows you to easily present the solutions in graphical form....
where is says use euler2, for that please create a function file for euler method and use that! please help out with this! please! screenahot the outputs and code! thanks!!! The van der Pol equation is a 2nd-order ODE that describes self-sustaining oscillations in which energy is withdrawn from large oscilations and fed into the small oscillations. This equation typically models electronic circuits containing vacuum tubes. The van der Pol equation is: dy dt where y represents the position coordinate,...