3

Problem 5_ Consider the function: f(c) = 1 + 4T1 +6(33 +32) + 451I2, I = [T1,T2]T (a) Use the starting point I = [0, 0JT , write a Matlab program to find an approxi...

Question

Problem 5_ Consider the function: f(c) = 1 + 4T1 +6(33 +32) + 451I2, I = [T1,T2]T (a) Use the starting point I = [0, 0JT , write a Matlab program to find an approximation of the optimal solution of the problem using the gradient method with & fixed step size 0 = 0.01. Terminate the algorithm when the gradient of f is less than 10-4. Plot the function value at each iteration and display the number of iterations needed. (b) Use the starting point [0, 0jT = write Matlab program to find an appro

Problem 5_ Consider the function: f(c) = 1 + 4T1 +6(33 +32) + 451I2, I = [T1,T2]T (a) Use the starting point I = [0, 0JT , write a Matlab program to find an approximation of the optimal solution of the problem using the gradient method with & fixed step size 0 = 0.01. Terminate the algorithm when the gradient of f is less than 10-4. Plot the function value at each iteration and display the number of iterations needed. (b) Use the starting point [0, 0jT = write Matlab program to find an approximation of the optimal solution of the problem using backtracking line search with the Armijo $ rule: Terminate the algorithm when the gradient of f is less than 10-:_ Plot the function value at each iteration and display the number of iterations needed:



Answers

Problems $85-92$ require the following discussion of a secant line. The slope of the secant line containing the two points $(x, f(x))$ and $(x+h, f(x+h))$ on the graph of a function $y=f(x)$ may be given as $m_{\mathrm{sec}}=\frac{f(x+h)-f(x)}{(x+h)-x}=\frac{f(x+h)-f(x)}{h} \quad h \neq 0$ (a) Express the slope of the secant line of each function in terms of $x$ and $h$. Be sure to simplify your answer. (b) Find $m_{\text {sec }}$ for $h=0.5,0.1$, and 0.01 at $x=1 .$ What value does $m_{\text {sec }}$ approach as h approaches $0 ?$ (c) Find an equation for the secant line at $x=1$ with $h=0.01$. (d) Use a graphing utility to graph fand the secant line found in part ( $c$ ) in the same viewing window. f(x)=2 x+5

Okay. What we're gonna do is we're gonna step through the process of, um, doing multiple things. So we're going to start with, um, a differential equation. Why? Prime is equal to X plus why? And the first thing we're gonna do is we want to plot the slope field, and we want to do it over, um, the X interval of negative four to positive four. And the UAE interval of negative four to positive four as well. And so, um, we're gonna go ahead. I'm gonna switch to, um, a slow field generator, which is actually Dez Mose. Um and so I have so field generator by Dez knows I already have X plus Y, um, in my differential equation place. So here is the slope field, Um, and you consume in if you want to. Um, I'm gonna keep it from basically negative 66 but you can zoom in if you would like to. Um, it's a little bit harder with Dismas, but if you have a t I inspire, you can set your window a swell. So that's the first thing. So this is the soap field of X Y. Prime equals x plus. Why And then the second thing we want to do is we want to find, um, the general solution. Okay, So what I'm gonna do is I'm a switch to ah, differential equation solver. This happens to be a simple lab. And so, as you can see, I've already put in there's multiple ones on the on the Internet. Why prime is equal to X plus y. And so when I did that, this one you since it's free, you're gonna have to deal with some advertisements. And then here is the solution right here and in below it. You can also see, um, the showing the steps of how the symbol lab actually calculated that general solution. So here's our generous elation. A negative x minus one plus some constant number times E to the X. So there is our general solution of Let's see why equal to negative X minus one plus some constant number times E to the X and then the second. The third thing we want to dio is we want to graph on our slow filled each solution for C one equal to negative to negative one, 01 and two. So that's what the third thing we want to do. So I'm gonna switch back to my slope field generator and let's see if we can get these in. Um, and so I have, um Why equal to negative Hex Mine looks. It's not what I wanted to dio. So there we go. Um, negative X minus one. And then we had No, it's gonna be a minus two minus to miss the 1st 1 and then e raised the X. So there is the first solution craft. Then we're gonna do why equals negative eggs minus one minus one. He raised Toothy X. And so there is the second solution, and then we're in. Keep going. Um, and the next one is just negative x on this one. Those the, um C one is zero. And then we do Why equals on this one. And then it was a plus. He raised the eggs. There is, so I haven't As you can see, these are all color coded. Um, and then they last one is negative. Ags minus one plus to you to the X. And so we'll wrap pop, generate. And there we have the five particular solutions graft in our slow field. Okay. And then, of course, you can always take a snapshot. Okay, Now, what we want to do is we want to find and graph the solution for with our initial condition of why of zero is equal to native seven tents. So we want to know what that solution is. And so we have Negative. 7/10 is equal to negative one plus C one e raised to the x o raised to the zero. I'm sorry, cause x zero. And so this is going to give me negative? No. We're gonna add the one over. So it's three tents is equal to see one. So that particular solution is why is equal to negative X minus one plus 3/10 mm to the X. Okay, so there we have that one. And so and we're also going to, um, graph the solution that satisfies on this space. Specified initial condition over the interval over the interval. Um, from zero to one this time. Okay. Now what I'm gonna go ahead and do is I'm gonna go ahead and not do that yet because I want to be able to graph in these, um, for a bunch of the next. Another step. So we have a bunch of Nixon other steps. Um And so, um, and what we want to do is, since it's over that interval, I actually need to know what he is at one. So we wanted at one. And so if I put in one four X, we're going to get a negative 1.18 so I need to keep that in mind. Okay, So now what we want to do is we want to find the Euler approximations so we can keep going on this, and we're gonna find the Euler approximations with several different sub intervals. So the first time is four sub intervals and there were do eight and then 16 and then 32 and number grand actually superimposed each of these on to our slope field. Okay, so that's something to remember. Um And so what we're gonna do is I'm gonna go ahead and switch to an online Euler Approximation calculator, and so I have one Here. It's to Planet Cal cook. Um and so how you do this is you putting your different your equation. Um, actually, go up here and put in the differential equation you put in the differential equation the initial X and Y values the point of approximation, which is that be value. And, of course, your step size. And so the first time we want to do it is at and 47 rolls, which would be, um, a 0.25 And then, of course, you devalue your exact solution, which is that negative X minus one plus 10.3 or three tents. E raised the X and then you hit calculate. And so we're to write down a couple things. So as I scroll on down one, the approximation appear is the approximate y value. So when X is one my approximate why values negative 1.27 So that's going to be critical to remember. And then also, we're gonna also look at kind of the, um, absolute error, which is this 0.831 time. And so where you come back and we're gonna add the's an so for sub for four four sub intervals. My approximation is one comma negative 1.27 and then I have an absolute error of 0.0 eight for you on. But I want the percent error. So the percent error is equal to that 0.831 divided by the actual which is or the absolute value of the actual, which is 1.18 So this is going to give me an error. Uh, 7.4%. Okay. And so now we're gonna go back into 8 16 and 32. Um, so we're gonna go back to the all online calculator, and I may come back here, and the only thing I really need to change is this Step size. So one divided by eight is point 1 to 5 it calculate again and you notice now my why value approximation is negative. 1.23 and my absolute errors 0.457 So I may come back, and I'm gonna write that down. So this is one common negative. 1.23 and that percent error now, is that point? What did we say? It was? 0.457 Divided by that 1.18 which is going to give me 3.87%. So that's a big decrease. And so now we're gonna go back and keep doing it for step size of 16 which is 160.6 to 5 for my step size. It calculates, and then we come down. Now it's negative 1.21 for my approximate and in absolutely era points he or two for one. So this would be it. One common negative 1.21 percent here. Equal two point 0241 divided by that 1.18 which is equal to 2.4%. And then we're gonna do the 4th 1 of believe it 0.0, 3125 it calculate. And now it's negative 1.20 with an absolute of error of 0.124 So this is one comma and negative 1.20 with a percent error equal two point 01 to 4, divided by the 1.18 which is 1.5 Percy. Okay. And so now what we want to do is go ahead and over the inter fall from zero toe one is to actually graph in or plot these Euler approximations. So I'm gonna actually switch to a another, um, slope. Um, field. Um which happens to be through a bluffed in. It's just gonna be able to help me plot in these specific points as supposed to the general solution or the Jialu Shin particular solution. So what? I'm gonna go ahead and do. I'm gonna go ahead and clear all curves. Um, and we actually wanted it from 0 to 4. So, um I mean, zero co one holly guys. Um and then I think this is actually gonna be in the negative side. Um, let me go, um, native to 20 Okay. And then what you do here is you put in all your solution. So with the 1st 1 we have put in is the actual workers at 18 negative. 1.18 Um, the next one. We had waas for that force of interval, which is that negative 1.27 Then we had a negative one point 23 lips and submit brat. And as you can see, the green is further away than your exact solution. And so each time I believe it's going to get closer and closer. Um And then, of course, that purple got closer to the red and then Of course, we had the last one, uh, zero. So there are my four that's in the orange so you can go ahead. And, as you can tell, as your sub intervals increased your approximate Euler approximation approach the exact value, Um and so let's go ahead and go back. And of course, you can take a snapshot of this, um and so let's go back to here. And then let's go ahead and discuss the improvement in the error, which makes sense. You would believe you would think that as, um, based off a calculus as the number of sub intervals as the number of sub intervals increased, then the, um approximation would approach the actual value or the exact solution. And so you would expect your percent error two d quick decrease, which it does

So it's also sketch did actual field for a differential equation. Knobs off, sketched out, and I'm gonna show you in a moment What I got now This is what I got's. And then we're told to guess the value off limits as X test in finishing. Now we have. That's why 00 you called to 1.5. So this is one. So let's say this is wild zero. So we have that the limits as X test infinity or five eggs. You can make a guess. That's it's probably going to be two or one because it's in between one and two. So let's make a guess. That isn't also one, Andi confirmed. That's in question number eight. By making a guest, that's gonna be one. You can make a guess off to also. Yeah, that doesn't Monsour. Now let's look at question number B. Now question will be once us. So use the last method with step size age record zero points one to find the approximation. Five off one. No, recalled Ula, met owed. Now we have. That's why of zero you called a 1.5. This implies that x zero quartz zero and then y zero quartz a 1.5 Now our F off extra mile. Why records y squared minus three. Why plus two this implies. And then by you as men Toad we have. That's why I n plus won't record. So why in blows age half off extend comma y end which in this case, will be why end plus 1/4 white and plus my h zero points one and then my f off x and y and will not be why and squared minus three y n last soon So this is all gonna juice So we know why zero already So to find why won't you take end to be 1/4 0? Now I make I've made it simple and then off calculated these So let's make it simple and explain on doing why end? So when n is one, we have zero points one which is 1.4750 and then when any Sue we have zero point soup which is 1.4501 when and his three. That's excellent. Does up on three of, um 1.45 to 3. You can continue these all along and then we get to end. That's X. And what end? We get any quarter AIDS, you have zero point AIDS and that's one point threes or it's four and they have nine. You have 0.9. That's one point to it. Several one and then saying which is 1.0, which is what we're looking for. Its one point so 666 so you can fill in the the samples. You're just using this formula. This is the formula you're using now. This implies that our fire off alone is approximately 1.2666 now for the seed pods. We're told to find the formula for five X. No, we have. That's Dwight. The eggs he called. So Y squared minus three. Why close to divide was said by Y squared. You have D y over y squared minus Terry. Why? Blast tube records DX into grids, both sides because it's separable. So what's the integral of these? We have to use special function now recall. That's or we can observe that these is just equal to why minus one. Moz played by wide lust soon, so why do for us this solved the partial function of these. Why my nose swan off y plus two, that would be a over. Why minus one plus being over white lost soon. When you're more supplied by this denominator, you off one because so a off y plus two plus B off y minus one. No, let's why he quotes one. You have that you're a because of minus one. Let's why quarter sue you have that you're being is important one. So this implies dance one over. Why minus won't Why minus to be called So minus one, which is my a o ver y minus one plus being over. Why minus two said at one place. That's when I go back to distribution star. I can write it as so stop becomes into girl off. All right, this has won over. Why? Minus two minus one over. Why minus one, Then do Why? Because this is the partial fraction of solved. Recalled to into girl off DX, way into good bees. You have natural love of absolute butt off Y minus two minus natural off. Why minus one equal to eggs plus c, I can rewrite this as not your love off. Why minus two over. Why? Minus one. You want to explore? See now, before I go on, I'm gonna get the initial value off. Why? Off zero it towards 1.5. This implies duds. Not sure. Log off minor. Zero points. Five over 0.5. Recall two X zero lost. See, this is equivalent of natural look of absolute ball off minus warn equal to see which is not your local one, which is equal to zero, not Charlotte of 10 Okay, I don't need an absolute value here because of taking the absolute value, so I don't need this again. So the natural laws of war is zero now, Missy is 1/4 0 So this implies that I have natural law off. Why? Minus two over why minus won't record two eggs plus C, which is zero explanation. What sides? You have y minus two over my minus warm. You call to exponential of X. This implies that's why minus two over why Miner sworn quarts of plus or minus two X now this point and it's making choice. Would it be in close for minors? Now? Let's quickly use the initial value y zero records of 1.5, So this would be 1.5 miles two b minor, 0.5 over 1.5 minutes without 0.5 equal to plus or minus E to the zero. So this is minus one week or two. So see, that joins us to be minus one. So that means we don't get the blows. It is actually miners. And that's what would Dr using the initial value. So this implies that why minus two over why minus one equal to minus me to the X. Because for this to people you have to use minors. No, a curse. Multiply both sides. I have why minus two Because you minus eat the eggs off. Why? Minus one That implies the Y minus two He called to minus Lied to the ex off. Why lost to be ex? When you pour this the guy you have, why off? One lost eating the eggs. You also eat the explosive soon and then why? Which is a good fight of eggs is it also eats and X plus two divided by E to the X plus one undocks is our answer Now we're told to we're told to on graph I on the direction fuel. So when I got off, I have already graft doubts and I'm gonna show you That's in the moments. Oh, which is this? So it is this black line. That is our question. If the answer we got in Patsy, that's is this line between one and two Now for the deep parts, we're told you chocolates. Five won't set out. He lost to us. It won over Italy, one plus one. That is approximately one point June 6. It's 94 We were told to compare these with the answer we got for you. As metal in part be so from parts be, we aren't Doug's fire off. One was approximately in court. One point sure six in six. So we see that the D for the D for. Bye Bobby. Less done. 0.3 Now for the e parts. We are told to get the exact solution off. Didn't seen time determine the linens as X test in finishing off five eggs, which has got to be eating explosive soon divided by each of the explosive one. Now you can And I used the fact that eat the eggs will dominate in time in the numerator and denominator. Or you can also use this idea because we are limited extent. Infinity divide within the merit challenge Nominates about eating ex So you have one blows two over easy eggs divided by one loss one over E t X Ah, specs. Destination it. See this Ghost zero. This goes to zero. There you will see that the answer would just be limits as X test infinity off alone, which is just because of one on that conforms with the guests. I aren't that the answer is one and that's corn farms are answered.


Similar Solved Questions

5 answers
Delined # the greatest interer Uz]; where the floor funetion: Show stepe for finding E{l/2]}, 3I
delined # the greatest interer Uz]; where the floor funetion: Show stepe for finding E{l/2]}, 3I...
2 answers
Polynomia/ as ' product of irreducible polynomials Write the following flx) = 8+2x+3 in Zslx]:
polynomia/ as ' product of irreducible polynomials Write the following flx) = 8+2x+3 in Zslx]:...
5 answers
Zomputeds1+1-2 22 + 2 +1
Zompute ds 1+1-2 22 + 2 +1...
5 answers
(2 pts) Evaluate the integral:arcsin( 4x )dx
(2 pts) Evaluate the integral: arcsin( 4x )dx...
5 answers
If (2.2.16) holds and ElIXI] < * show thatElxX] = akPlX = ok]I (2.2.16) holds and f: R _ R is measurable and bounded, show that Elf(x)] #= Ef(ax)PIX ak]
If (2.2.16) holds and ElIXI] < * show that ElxX] = akPlX = ok] I (2.2.16) holds and f: R _ R is measurable and bounded, show that Elf(x)] #= Ef(ax)PIX ak]...
1 answers
The oxygen content $t$ days after organic waste has been dumped into a pond is given by $$ f(t)=100\left(\frac{t^{2}+10 t+100}{t^{2}+20 t+100}\right) $$ percent of its normal level. a. Show that $f(0)=100$ and $f(10)=75$. b. Use the intermediate value theorem to conclude that the oxygen content of the pond must have been at a level of $80 \%$ at some time. c. At what time(s) is the oxygen content at the $80 \%$ level? Hint: Use the quadratic formula.
The oxygen content $t$ days after organic waste has been dumped into a pond is given by $$ f(t)=100\left(\frac{t^{2}+10 t+100}{t^{2}+20 t+100}\right) $$ percent of its normal level. a. Show that $f(0)=100$ and $f(10)=75$. b. Use the intermediate value theorem to conclude that the oxygen content of t...
5 answers
[Using LMSRecognize- ActivityActlvity: Indlcate cach case whether these half-reactions represent an oxIdation or reduction process Tnen describe each reactant a5 wn oxidlsing rcducing agent;2H,0Oxidation state Page352032507
[Using LMS Recognize- Activity Actlvity: Indlcate cach case whether these half-reactions represent an oxIdation or reduction process Tnen describe each reactant a5 wn oxidlsing rcducing agent; 2H,0 Oxidation state Page3 5203 2507...
5 answers
(u;mu) Vxa ~Lutl seql Lxe ~VL"4 Ii sMenest hy Z6. su1t" 2X+y0**7_ "IftGtih(sl,i s
(u;mu) Vxa ~Lutl seql Lxe ~VL"4 Ii sMenest hy Z6. su1t" 2X+y0**7_ "IftGtih(sl,i s...
5 answers
What value of the repulsion constant, $n$, gives the
What value of the repulsion constant, $n$, gives the...
5 answers
Find an equation for the parabola that has its vertex at the origin and satisfies the given condition(s).Focus on the positive $x$ -axis, 2 units away from the directrix
Find an equation for the parabola that has its vertex at the origin and satisfies the given condition(s). Focus on the positive $x$ -axis, 2 units away from the directrix...
5 answers
10 pointsFor the vectors A = 15i+70j and B =-10i-18 j determine the cross product AxB: O 430i 1410430k-1410
10 points For the vectors A = 15i+70j and B =-10i-18 j determine the cross product AxB: O 430i 1410 430k -1410...
5 answers
Is this graph connected?TrueFalse
Is this graph connected? True False...
5 answers
5.8.9The half-life of radium Is 1690 years. If 70 grams are present now, how much will be present in 170 years?grams(Do not round until the final answer. Then round to the nearest thousandth as needed )
5.8.9 The half-life of radium Is 1690 years. If 70 grams are present now, how much will be present in 170 years? grams (Do not round until the final answer. Then round to the nearest thousandth as needed )...
5 answers
1 number H # = 1 Wunol cat on neat neeoed to thc cemast U 0MI 1 Jidwn 41 U 47- "Cur 10.2 704
1 number H # = 1 Wunol cat on neat neeoed to thc cemast U 0MI 1 Jidwn 41 U 47- "Cur 10.2 704...
5 answers
Is an implication equivalent to its converse? Verify your answer using a truth tableaExplain why a contradiction implies any proposition and any proposition implies a tautology:
Is an implication equivalent to its converse? Verify your answer using a truth table a Explain why a contradiction implies any proposition and any proposition implies a tautology:...
5 answers
Consider the function f(0) sin(20) where 0 represents number of radians_ Complete the following table of valuesf(0); 3Graph the function f below:fc0)31/221Clear AII Draw:What is the period of f?Preview
Consider the function f(0) sin(20) where 0 represents number of radians_ Complete the following table of values f(0) ; 3 Graph the function f below: fc0) 31/2 21 Clear AII Draw: What is the period of f? Preview...

-- 0.022022--