Answers
Here I have done for 1st two cases.
Thank you so much sir
(a) del, -1h=0.5 y'(a) = = -1 YOU +(-1) COS(W) + -(1+61)) Biu(3) > Y'a)=-461) +2 Costa) Yo1 Y=1, to=o. foc.Y) = - YOU) + 2 CUSCOW Euler's Method: Yuxia Yuth Hand nao, Yo = Yoth ff. Mo) =Yoth(-Yo + 2 205(86) = 1+0.5x (-1+2 os 1.5 -4, = 40.5) sus X= 70th 20+0.5 = 0.5 no. Y2 = Yyth of 2, 4) = Neth (Y,+ 2 cos (1) = 1.5+0.5xl - 1.5+ 2 cos O.
5)) =1.6276 The true solution : YO)=1 (wong tsinela cost)) yo.s) = sin 0.5) + cos2,5) = \.3570 १९) - sinux os i) = 13818 i forh=0.5,d=- true solutions Y 0)=1 Y(0.5) = 1.3570 70=0, Yo-Yo=1 2=0.5. Y = 9(0.5)=1.5 YO -1,3818 22=1,Y₂ = 46.0) = 1.6276
a) % Euler Method clear all clc; format short for k=1:3 lambda=-1 h=1/24k f=@(X,Y)lambda*Y+(1-lambda)*cos(x)- (1+lambda)*sin(x); X = 0:h:10; Y = zeros(1.length(x)); Y(1)=1; % index has been taken as i instead of o for n=1:(length(x)-1) Y(n+1) = Y(n)+h*f(x(n), Y(n)); end j=1; for X=0:h:10 true_sol=cos(X)+sin(X); True_Sol(i)=true_sol; j=i+1; end x_Y_TrueSol=[x' Y' True_Sol'] % Solution of ODE at t=0 to 3 end OUTPUT lambda = -1 h = 0.5000
x_Y_TrueSol = 0 1.0000 1.0000 0.5000 1.5000 1.3570 1.0000 1.6276 1.3818 1.5000 1.3541 1.0682 2.0000 0.7478 0.4932 2.5000 -0.0423 -0.2027 3.0000 -0.8223 -0.8489 3.5000 -1.4011 -1.2872 4.0000 -1.6370 -1.4104 4.5000 -1.4722 -1.1883 5.0000 -0.9469 -0.6753 5.5000 -0.1898 0.0031 6.0000 0.6138 0.6808 6.5000 1.2671 1.1917 7.0000 1.6101 1.4109 7.5000 1.5590 1.2846 8.0000 1.1261 0.8439 8.5000 0.4176 0.1965 9.0000 -0.3932 -0.4990 9.5000 -1.1077 -1.0723 10.0000 -1.5510 -1.3831 lambda = h = 0.2500 x_Y_TrueSol = 0 1.0000 1.0000 0.2500 1.2500 1.2163 0.5000 1.4220 1.3570 0.7500 1.5053 1.4133 1.0000 1.4948 1.3818 1.2500 1.3912 1.2643
1.5000 1.2011 1.0682 1.7500 0.9362 0.8057 2.0000 0.6130 0.4932 2.2500 0.2517 0.1499 2.5000 -0.1253 -0.2027 2.7500 -0.4946 -0.5426 3.0000 -0.8331 -0.8489 3.2500 -1.1198 -1.1023 3.5000 -1.3369 -1.2872 3.7500 -1.4709 -1.3921 4.0000 -1.5135 -1.4104 4.2500 -1.4619 -1.3411 4.5000 -1.3195 -1.1883 4.7500 -1.0950 -0.9617 5.0000 -0.8025 -0.6753 5.2500 -0.4600 -0.3468 5.5000 -0.0890 0.0031 5.7500 0.2876 0.3529 6.0000 0.6463 0.6808 6.2500 0.9648 0.9663 6.5000 1.2233 1.1917 6.7500 1.4058 1.3431 7.0000 1.5008 1.4109 7.2500 1.5026 1.3910 7.5000 1.4109 1.2846 7.7500 1.2315 1.0984 8.0000 0.9755 0.8439 8.2500 0.6589 0.5369 8.5000 0.3013 0.1965 8.7500 -0.0750 -0.1561 9.0000 -0.4467 -0.4990 9.2500 -0.7906 -0.8109 9.5000 -1.0853 -1.0723 9.7500 -1.3126 -1.2671 10.0000 -1.4582 -1.3831
b) % Euler Method clear all clc; format short for k=1:3 lambda=1 h=1/24k f=@(X,Y)lambda*Y+(1-lambda)*cos(x)- (1+lambda)*sin(x); x = 0:h:10; Y = zeros(1,length(x)); Y(1)=1; % index has been taken as i instead of o for n=1:(length(x)-1) Y(n+1) = Y(n) +h*f(x(n),Y(n)); end j=1; for X=0:h:10 true_sol=cos(x)+sin(x); True_Sol(j)=true_sol; j=j+1; end X_Y_TrueSol=[x' Y' True_Sol'] % Solution of ODE at t=0 to 3 end OUTPUT lambda = 1 h = 0.5000 x_Y_TrueSol = 0 1.0000 1.0000
0.5000 1.5000 1.3570 1.0000 1.7706 1.3818 1.5000 1.8144 1.0682 2.0000 1.7241 0.4932 2.5000 1.6768 -0.2027 3.0000 1.9168 -0.8489 3.5000 2.7341 -1.2872 4.0000 4.4519 -1.4104 4.5000 7.4346 -1.1883 5.0000 12.1294 -0.6753 5.5000 19.1531 0.0031 6.0000 29.4352 0.6808 6.5000 44.4322 1.1917 7.0000 66.4332 1.4109 7.5000 98.9928 1.2846 8.0000 147.5512 0.8439 8.5000 220.3374 0.1965 9.0000 329.7076 -0.4990 9.5000 494.1492 -1.0723 10.0000 741.2990 -1.3831 lambda = 1 h = 0.2500 x_Y_TrueSol = 0 1.0000 1.0000 0.2500 1.2500 1.2163 0.5000 1.4388 1.3570 0.7500 1.5588 1.4133 1.0000 1.6077 1.3818 1.2500 1.5888 1.2643 1.5000 1.5116 1.0682 1.7500 1.3907 0.8057
2.0000 1.2464 0.4932 2.2500 1.1033 0.1499 2.5000 0.9901 -0.2027 2.7500 0.9384 -0.5426 3.0000 0.9822 -0.8489 3.2500 1.1572 -1.1023 3.5000 1.5006 -1.2872 3.7500 2.0511 -1.3921 4.0000 2.8497 -1.4104 4.2500 3.9405 -1.3411 4.5000 5.3731 -1.1883 4.7500 7.2052 -0.9617 5.0000 9.5061 -0.6753 5.2500 12.3621 -0.3468 5.5000 15.8821 0.0031 5.7500 20.2054 0.3529 6.0000 25.5109 0.6808 6.2500 32.0283 0.9663 6.5000 40.0520 1.1917 6.7500 49.9574 1.3431 7.0000 62.2217 1.4109 7.2500 77.4487 1.3910 7.5000 96.3993 1.2846 7.7500 120.0301 1.0984 8.0000 149.5404 0.8439 8.2500 186.4308 0.5369 8.5000 232.5772 0.1965 8.7500 290.3222 -0.1561 9.0000 362.5904 -0.4990 9.2500 453.0319 -0.8109 9.5000 566.2030 -1.0723 9.7500 707.7913 -1.2671 10.0000 884.8989 -1.3831 lambda = 1
h = 0.1250 X_Y_TrueSol = 0 1.0000 1.0000 0.1250 1.1250 1.1169 0.2500 1.2345 1.2163 0.3750 1.3269 1.2968 0.5000 1.4012 1.3570 0.6250 1.4565 1.3961 0.7500 1.4923 1.4133 0.8750 1.5084 1.4085 1.0000 1.5051 1.3818 1.1250 1.4829 1.3334 1.2500 1.4426 1.2643 1.3750 1.3857 1.1754 1.5000 1.3137 1.0682 1.6250 1.2286 0.9444 1.7500 1.1325 0.8057 1.8750 1.0281 0.6546 2.0000 0.9180 0.4932 2.1250 0.8055 0.3241 2.2500 0.6936 0.1499 2.3750 0.5858 -0.0266 2.5000 0.4856 -0.2027 2.6250 0.3966 -0.3756 2.7500 0.3227 -0.5426 2.8750 0.2677 -0.7012 3.0000 0.2353 -0.8489 3.1250 0.2294 -0.9833 3.2500 0.2539 -1.1023 3.3750 0.3127 -1.2042 3.5000 0.4096 -1.2872 3.6250 0.5485 -1.3502 3.7500 0.7333 -1.3921 3.8750 0.9678 -1.4123
4.0000 1.2562 -1.4104 4.1250 1.6024 -1.3866 4.2500 2.0108 -1.3411 4.3750 2.4859 -1.2746 4.5000 3.0325 -1.1883 4.6250 3.6560 -1.0835 4.7500 4.3620 -0.9617 4.8750 5.1571 -0.8249 5.0000 6.0484 -0.6753 5.1250 7.0442 -0.5151 5.2500 8.1538 -0.3468 5.3750 9.3877 -0.1732 5.5000 10.7583 0.0031 5.6250 12.2795 0.1794 5.7500 13.9673 0.3529 5.8750 15.8403 0.5209 6.0000 17.9196 0.6808 6.1250 20.2294 0.8300 6.2500 22.7974 0.9663 6.3750 25.6554 1.0875 6.5000 28.8394 1.1917 6.6250 32.3905 1.2773 6.7500 36.3556 1.3431 6.8750 40.7875 1.3878 7.0000 45.7465 1.4109 7.1250 51.3005 1.4120 7.2500 57.5266 1.3910 7.3750 64.5117 1.3483 7.5000 72.3538 1.2846 7.6250 81.1635 1.2009 7.7500 91.0654 1.0984 7.8750 102.2000 0.9788 8.0000 114.7250 0.8439 8.1250 128.8183 0.6958 8.2500 144.6797 0.5369 8.3750 162.5340 0.3695
8.5000 182.6340 0.1965 8.6250 205.2636 0.0203 8.7500 230.7422 -0.1561 8.8750 259.4288 -0.3301 9.0000 291.7268 -0.4990 9.1250 328.0896 -0.6601 9.2500 369.0270 -0.8109 9.3750 415.1119 -0.9490 9.5000 466.9885 -1.0723 9.6250 525.3808 -1.1789 9.7500 591.1032 -1.2671 9.8750 665.0709 -1.3355 10.0000 748.3136 -1.3831
.
Similar Solved Questions
1 answer
What is the pH of a 0.720 M aqueous solution of NH4NO3? The Kb for NH3...
What is the pH of a 0.720 M aqueous solution of NH4NO3? The Kb for NH3 is 1.8 x 10-5....
1 answer
Calculate the quantity (mmol) of reagents to be used in the assigned experiment. Which reagent is...
Calculate the quantity (mmol) of reagents to be used in the assigned experiment. Which reagent is the limiting reagent? Show by calculations. 8. n the reaction of vanillin with silver oxide, what gets oxidized and what gets reduced? Part B: Miniscale Hydrolysis of Methyl Salicylate To a 25-mL round...
1 answer
Question 15 (1 point) Three males with an X-linked genetic disorder have one child each. The...
Question 15 (1 point) Three males with an X-linked genetic disorder have one child each. The random variable X is the number of children among the three who inherits the X-linked genetic disorder. The probability distribution for random variable X is given below X P(X=x) O 0.4219 0.4219 0.1406 N 3 0...
1 answer
7.By measuring the equilibrium between liquid and vapor phases of a solution at 30°C at 1.00...
7.By measuring the equilibrium between liquid and vapor phases of a solution at 30°C at 1.00 atm, it was found that XA 0.220 when yA 0.314. Calculate the activities and activity coefficients of both components in this solution on the Raoult's law basis. The vapor pressures of the pure compon...
1 answer
1. Determining the Wavelength of Maximum Absorption: 2. Determining the concentration of an Unknown Solution Volume...
1. Determining the Wavelength of Maximum Absorption: 2. Determining the concentration of an Unknown Solution Volume of Stock Concentration of Soln #1 T2.001.xlon #2 5.00 2.5x loin . . x ^ 10.00 Soxom A=493.6 mm Rad y o sxlom Recorded Absorbance 0.212 0.528 0.947 1453 #4 Calibration Curve Slope of Le...
1 answer
A closed monopoly is pushed by other firms that wish to enter the market by earning...
A closed monopoly is pushed by other firms that wish to enter the market by earning normal profits the development of substitute products and challenges to any legal barriers that limit competition. the threat of closing down the free market and other firms it its industry...
1 answer
Letter answer is good ay ith(3 Final Exam Page 10 of 13 Math 128 (O)-1. What is y(6)? y(°-- : 3, and 23. Suppose y(t) is a function for which aty st, y(0) Suppose y(t) is a function for whicht, y da A...
letter answer is good ay ith(3 Final Exam Page 10 of 13 Math 128 (O)-1. What is y(6)? y(°-- : 3, and 23. Suppose y(t) is a function for which aty st, y(0) Suppose y(t) is a function for whicht, y da A. 33 B. 2 D. 5.5 24. The wait times, in minutes, to order at a local cafe are exponentially dist...
1 answer
Hi, can you check these answers? Thank you! The last four years of returns for a...
Hi, can you check these answers? Thank you! The last four years of returns for a stock are as follows: Year 3 2 28.3% Return - 4.1% 12.3% 4.3% a. What is the average annual return? b. What is the variance of the stock's returns? c. What is the standard deviation of the stock's returns? a. Wh...
1 answer
BioSTATS Sleep apnea syndrome is a sleep disorder characterized by a cessation of respiratory flow during...
BioSTATS Sleep apnea syndrome is a sleep disorder characterized by a cessation of respiratory flow during sleep. Symptoms of this syndrome include waking up (symptom A) and daytime sleepiness (symptom B). In a large clinical study, 56% of patients (group 1) had both symptoms A and B, 21% of patients...
1 answer
2. (10 points) A 2D Transform X is given below. Find the 2-stage inverse integer wavelet...
2. (10 points) A 2D Transform X is given below. Find the 2-stage inverse integer wavelet transform for X. Use (1,1) integer wavelet transform. (a) Find the matrix y4 after inverse row transform in the second stage. 2x2 (b) Find the matrix y3 after inverse column transform in the second stage. 2x2 (c...
1 answer
5) (17 points) Maintenance costs for a bridge are cyclic with the following costs occurring over...
5) (17 points) Maintenance costs for a bridge are cyclic with the following costs occurring over a 5-year period. MARR is 10% per year compounded annually. EOY 2 3 5 Maintenance S50 million $75 million $75 million $75 million $150 million Cost 1 4 a) (14 points) Compute an equivalent uniform annual ...
1 answer
Orole Company lends Riverbed industries 554000 on January 1, 2022, accepting 9-month that it will eventually...
Orole Company lends Riverbed industries 554000 on January 1, 2022, accepting 9-month that it will eventually be able to collect the debt, which of the following entries should most interest note Riverbed ly be made by Orole? shoot the note and does not pay at maturity but Oriol expects Accounts Rece...
1 answer
10. During procedures of the upper gastrointestinal tract, the operating table may be tipped into a._____________...
10. During procedures of the upper gastrointestinal tract, the operating table may be tipped into a._____________ position in order to shift the abdominal viscera away from the target tissues. During lower pelvic procedures the operating table may be tipped into b.____________ to shift the abdominal...
1 answer
Define in a paragraph the term mole, and explain how this metric unit relates to the...
Define in a paragraph the term mole, and explain how this metric unit relates to the molor Concentration of a Solution...
1 answer
19. You purchase a 5-year and 10%-coupon rate bond with face amount of $1,000 at par value. One year later, market inter...
19. You purchase a 5-year and 10%-coupon rate bond with face amount of $1,000 at par value. One year later, market interest rate increases from 10% to 20%, what is the rate of capital gain for the bond? (A) -40.3%. (B) -29.5%. (C) -25.9%. (D) -30.3%. (E) -15.9% 20.Refer to Q19, what is the rate of r...