Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The general solution to the differential equation du = A(L) x +A(2)+A(3) cos(x) isi 96x) A1 +442) 2 +A(3) sin(x) +C with y0) = c.

image text in transcribed
image text in transcribed
image text in transcribed
The general solution to the differential equation du = A(L) x +A(2)+A(3) cos(x) isi 96x) A1 +442) 2 +A(3) sin(x) +C with y0) = c. The goal of this exercise is to write a script file to plot the solutions to the differential equations in the interval 0 SXsxe, with initial conditions (0) = C1,C2,C3 Tho script should have the structure script+function. Take a look at the provided tomplate for a better understanding Plot the graphs in the same window and use different color and different 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 similar to Problem 4 Add a legend with the list of values used for each graph Add the title 'Solutions to the given differential equaton Note: The values for A1, A2, A3, C1, C2 C3 and x have already been calculated for you. You simply need to use these values as represented in the equations above 1 init_variables; 2 3 y=f(x,0) yi is the evaluation corresponding to C=C1 4 y2=f(x,x) y2 is the evaluation corresponding to C=C2 5 y3=f(x,xe) y3 is the evaluation corresponding to C=C3 6 hold on 7 plot(x,y1) 8 plot(x,y2,-) 9 plot(x,y3) 10 hold off 11 titleplot('Solution to the given differential equation) 12 legend (C1,C2,C3) 13 14 function y = x,c) 15 global A 16 17 end 18 yax.^2+C 3 Is y2 calculated correctly? 0% (17%) 3 Is y3 calculated correctly? 0% (17%) 3 Does the solution have the structure script+function 0% (17%) 3 Do the plots satisfy all the requirements ? 0% (16%) 3 Are the x and y values of the plot correct? 0% (16%)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL Crash Course A Hands On Introduction To Database Development

Authors: Rick Silva

1st Edition

1718503008, 978-1718503007

Students also viewed these Databases questions