Question: Exercise 5 The general solution to the differential equation d y d x = - 1 5 x + 1 0 x 2 + 7

Exercise 5
The general solution to the differential equation dydx=-15x+10x2+7cos(x) is
y(x)=-152x2+103x3+7sin(x)+C, with y(0)=C
The goal of this exercise is to write a script file to plot the solutions to the differential equation in the interval 0x8, with initial conditions y(0)=250,410,620.
The script file should have the structure script+function (similarly to the M-file myplot2.m Example 2). Call the file ex5.m. The function that defines y(x) must be included in the same file (note that the function defining y(x) will have two input arguments: x and C).
Your M-file should have the following structure (fill in all the ?? with the appropriate commands):Plot the graphs in the same window and use different color and/or line-styles for each graph. To plot the graphs in the same window you can use the command hold on or use the plot command similarly to Exercise 4.Add the title 'Solutions to dy//dx=-15 x+10x^(2)+7cos(x)'.Add a legend with the list of C values used for each graph.(Type help plot for a list of the different line-styles, and help legend for help on how to add a legend.) Include both the M-file and the plot in your report.NOTE: the only output of the seript file should be the graph of the three curves. Make sure you use enough points so that the curves are nice and smooth.
Exercise 5 The general solution to the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!