This is the assignment I only need help with the coding port

This is the assignment.. I only need help with the coding portion. The discussion I can do on my own. Thanks.

In this project we use MATLAB to analyze the solution of the Initial Value Problem dy dar Part 1: Direction Field Sketch the direction field of the given differential equation and use the initial condition to generate the graph of the solution. Create the direction field for the differential equation dy 3r2y dr Click on the point (0,1) Save the picture as a Jpeg Include the final picture of your Direction Field in your report Part 2: Euler\'s Approximation Method Use the Euler method ym hf(zn,yn) with stepsize h 0.01 and 0.001 to find an approximation of y(1). (Make sure that you have the correct number of iterations.) (2) Solve the IVP by hand (by using the separable equation method), and find the actual value for y(1). (3) Graph the function you found in (2).(See step 8-10 on the orientation sheet) (1) yapproz (4) Find the relative error for h 0.01 and 0.001 y (1) (5) Discuss your findings

Solution

%Initial Equation

syms y(x)

%First order differential of y

Dy=diff(y,x);

%Solving the equation using dsolve including initial condition

y(x)=dsolve(Dy-3*x^2*y==0,y(0)==1)

%Solution :y(x)=exp(x^3)

%Plotting the function

x=[0:10]

plot(x,y(x));

Since,you only require the code . I don\'t know wether to proceed with 2nd part.

This is the assignment.. I only need help with the coding portion. The discussion I can do on my own. Thanks. In this project we use MATLAB to analyze the solut

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site