Question

Consider the following problem Solve for y(t) in the ODE below (Van der Pol equation) for t ranging from O to 10 seconds with initial conditions yo) = 5 and y(0) = 0 and mu = 5. Select the methods below that would be appropriate to use for a solution to this problem. More than one method may be applicable. Select all that apply. ? Shooting method Finite difference method MATLAB m-file euler.m from course notes MATLAB m-file odeRK4sys.m from course notes MATLAB function ode45 Fourth order centered differencing MATLAB integral function

0 0
Add a comment Improve this question Transcribed image text
Answer #1

FInd the solution of the given vdp equation using ode45 solver of MATLAB:

%================ Main script ===============

% Calliing ode45 solver
[t,y] = ode45(@vdpeq,[0 10],[5; 0]);

plot(t,y(:,1),'-.',t,y(:,2),'-.')
title('Solution of van-der-Pol Equation using ode45 solver with \mu = 5');
xlabel('Time(t)');
ylabel('y');
legend('y_1','y_2')

%========================================

Note: for implementing ode45 solver, we reformulate the given ODE in two first order ODEs using the following function:

%============== van-der-Pol function ===========

function dydt = vdpeq(t,y)
mu=5;
dydt = [y(2); mu*(1-y(1)^2)*y(2)-y(1)];

%=========================================

Solution plot:

Note: The function name must be same as the name of the file it is contained in.

Add a comment
Know the answer?
Add Answer to:
Consider the following problem Solve for y(t) in the ODE below (Van der Pol equation) for...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT