anonymous 5 years ago Using Lagrange multipliers to find the maxium and minimum values of the function f(x,y,z)+xy^2z^3 subject to x^2+y^2+2z^2=25. PLEASE HELP

1. anonymous

So you're gonna go through the equation taking derivatives with respect to all three variables but one at a time. So first, derive the equation with respect to the variable 'x' while treating y,z like constants, that's one derivative. Then do the same again but with only y as the variable, and then again with z.

2. anonymous

Let me know when you have done that much!

3. anonymous

so I need to take partials in respect to each variable fx, fy, fz?

4. anonymous

so fx=y^2z^3 fy=2xyz^3 fz=3xy^2z^2

5. anonymous

yes, partials. gimme a second

6. anonymous

wait a second, rephrase your question. what do you mean by f(x,y,z)+xy^2z^3 ??

7. anonymous

do you have two functions?

8. anonymous

f(x,y,z)=xy^2z^3 subject to the constraint of x^2+y^2+2z^2=25

9. anonymous

I'm in the middle of two other quesitons. If you're not rushed, I can get back to you on this one. alright?

10. anonymous

not rushed it is due in the morning, thank you for your help. this site is fun

11. anonymous

brb

12. anonymous

well, in 30

13. anonymous

okay

14. anonymous

i couldn't get thru, som' about about the server not receiving my post but I'm still looking at the problem. Just grabbed my snack and I'm not browsing my calc book.

15. anonymous

thanks

16. anonymous

it's an optimization. very much in the line of those classic optimization problems in simpler calculus but I haven't done one in a bit

17. anonymous

18. anonymous

i am confused because i left my book at home and I am at school

19. anonymous

something to do with taking the gradient of the constraint

20. anonymous

we have not done this type of problem, and i have no information in my notes

21. anonymous

which calculus are you taking?

22. anonymous

calc 4, 3-d vectors, multivarible

23. anonymous

nice

24. anonymous

problem is only worth 5 points but i think it is important to know how to do it

25. anonymous

i agree

26. anonymous

i'm dining and browsing pages at the same time...

27. anonymous

in a weird way, i miss school; funny how that works

28. anonymous

eat, i dont want to ruin your dinner, just get back to me when you are finished

29. anonymous

30. anonymous

i only have 2 more math classes and 3 physical chem classes and 3 chem engineering classes and then I am done

31. anonymous

lol, then heading for the petroleum industry?

32. anonymous

i want to do desalinization, water filtration, water is the next oil!

33. anonymous

or if i could figure out how to make coal a clean fuel source

34. anonymous

the chapter on lagrange multipliers starts: in my applications we must find the extrema of a function of several variables when the variables are restricted in some manner.

35. anonymous

gimme a quick second

36. anonymous

f (xyz) =xyz + (2xz + 4yz + 8xy − C) does this formula seem familiar

37. anonymous

why?

38. anonymous

you're end up with 2 numbers at the end, the maximum and minimum.

39. anonymous

correct this is what i need

40. anonymous

i need to solve for x and y

41. anonymous

correct? i could be wrong

42. anonymous

actually, it's a little different

43. anonymous

z is negilble because it is the depth and not going to be a min or a maxium

44. anonymous

the minimum and maximum values will be points on the graph which happens to be a 3 variable function

45. anonymous

all the variables are going to count

46. anonymous

okay

47. anonymous

the maximum and minimum values will be points in a 3 dimensional space, so they'll look like (x1,y1,z1) and (x2,y2,z2)

48. anonymous

if we didn't have the constraint, it would be straight forward. we'd find the partials, set them all equal to zero and then solve for the three variables.

49. anonymous

since we would have fx=0, fy=0, fz=0; all equations in their own right, and we have 3 variables, we would be able to solve this problem completely.

50. anonymous

depending on how many CRITICAL points we find, some could be maximum(s) and others minimum(s)

51. anonymous

thoughts?

52. anonymous

so take the partials and set them equal to zero and solve for a x, y, or z and plug the values into the equations

53. anonymous

is that the first step?

54. anonymous

that would only be if we didn't have a constraint; since we have a constraint, we need to find a way to include it in our optimization.

55. anonymous

so take the constraint and solve for one of the variables. pick which ever one you'd like

56. anonymous

by the way, i take it you're in college...what year?

57. anonymous

i am a junior

58. anonymous

where?

59. anonymous

so the contratint is x^2+y^2+2z^2=25

60. anonymous

and let me know once you have solved for one of the variables in the constraint...

61. anonymous

at Ohio State

62. anonymous

that's correct. chose one variable, x, y or z and solve for it

63. anonymous

good stuff

64. anonymous

I graduated from Stanford and I'm currently working in the DC area

65. anonymous

chose a variable that's gonna make it easy on you cuz we'll have to plug whatever that variable is equal to into the f(x,y,z) function!

66. anonymous

once we do that, we'll have one function with only 2 variables and we can find the two partials, set them equal to zero and solve!

67. anonymous

show me your work and let me know what you're thinking so that I can guide you in case you get lost...

68. anonymous

69. anonymous

with the 2 present in the constraint the value i get solving for x=5-y-\sqrt{2z ^{2}}\]

70. anonymous

$x=5-y-\sqrt{2z ^{2}}$

71. anonymous

thank you! much better

72. anonymous

let me check...

73. anonymous

walk me thru how you got this step by step...or just to the part before you took the square root

74. anonymous

the constraint equation is $x ^{2}+y ^{2}+2z ^{2}=25$

75. anonymous

solve for X, so I squared both sides

76. anonymous

first you took y^2 and 2z^2 to the other side

77. anonymous

yeah, then squared both sides

78. anonymous

and then you had $x^2 = 25 - 2z^2 - y^2$

79. anonymous

yep

80. anonymous

the square of the right isn't exactly what you got bradley

81. anonymous

so should i not square the equation?

82. anonymous

no, that was right

83. anonymous

okay so what do i do with it? do i plug it into the partial?

84. anonymous

the square root of 25-2z^2-y^2 doesn't simplify to that.

85. anonymous

dude, give 10 minutes

86. anonymous

okay you are fine

87. anonymous

oh how i hate contraints

88. anonymous

yes it does simplft to that

89. anonymous

i hate this problem

90. anonymous

i'm back and we're gonna solve this problem. sorry for the delay

91. anonymous

i need to find a gradient of the the f(x,y,z) right?

92. anonymous

yes, but we need to take the constraint into account

93. anonymous

so we solve for one variable, x like you did above

94. anonymous

the $x= \sqrt{25-2z^2-y^2} \neq 5 - y - \sqrt{2x2}$

95. anonymous

the $x=\sqrt{25-2z^2-y^2} \neq 5 - y - \sqrt{2x^2}$

96. anonymous

are we good here?

97. anonymous

yes

98. anonymous

if you're not sure why those two are NOT equal, look it up when you get a chance.

99. anonymous

i figured that part out

100. anonymous

now back to our function, plug this new found value of x into our original function replacing it at every place where x shows up

101. anonymous

102. anonymous

so the original function was $f(x,y,z) = xy^2z^3$

103. anonymous

what did you get?

104. anonymous

here's another thing to think about: if you had chosen y instead of x, we would be square it and getting rid of the nasty square root. you wanna do that again?

105. anonymous

do let me know what you're thinking and if you're start getting lost...

106. anonymous

$\sqrt{25-2z ^{2}-y ^{2}}y ^{2}z ^{3}$

107. anonymous

oh did not think of that

108. anonymous

but you see why that would have been smart?

109. anonymous

still is...

110. anonymous

why does the y solve and the radical go away?

111. anonymous

oh never mind i see it, let me check

112. anonymous

Bradley, we're solving this without using Lagrange Multipliers (LMs)....this is gonna give us another but apparently the LMs provides a nicer way....we're gonna look into that after.

113. anonymous

it's very good to see you check your work and see why things are why they are. keep it up!

114. anonymous

once you have the function of $f(x,z)$ you can find fx and fz, set them equal to zero and solve them. you'll have 2 equations and 2 variables. you see why it's gonna fx and fz? because why will have been replaced by those two.

115. anonymous

$x(25-2z ^{2}-x ^{2})z ^{3}$

116. anonymous

what is this? always remember to represent functions in terms of f(x)=something...

117. anonymous

in this case it would be $f(x)=....$. multiply it out and then find fx and then fz.

118. anonymous

so what i wrote before is the f(x,z)

119. anonymous

that's correct

120. anonymous

now can you find fx and fz, set them equal to zero and solve for x and z?

121. anonymous

so take the partial of each?

122. anonymous

find each partial

123. anonymous

note: this will give you the answer, but not using the method the suggested. i'm looking at exactly how Lagrange Multipliers work. it's something like $\Delta f(x,y,z) = \lambda \Delta g(x,y,z)$ where $g(x,y,z)$ will be your constraint function.

124. anonymous

partial of fx=$25z ^{3}-2z ^{5}x-x ^{3}z ^{3}$

125. anonymous

the Lagrange multiplier is no jok but we might be able to figure out if you stick around :)

126. anonymous

fz=$75xz ^{2}-10z ^{4}x-3x ^{3}z ^{2}$

127. anonymous

i am here until it is done

128. anonymous

damn, these are some nasty looking numbers!

129. anonymous

nasty looking functions i should say

130. anonymous

yep, i think this is why the lagrange multiplers are needed

131. anonymous

absolutely right

132. anonymous

any way, let's finish this first. if we can, lol

133. anonymous

so we set those partials to zero and see what happens

134. anonymous

are you good with algebra?

135. anonymous

pretty good

136. anonymous

that's what I like to hear! so let's simply the hell out of these two and solve the system of 2 equations to find the solution

137. anonymous

so set them both equal to zero, simplify, and then solve for x and z

138. anonymous

let me know if you get stuck

139. anonymous

i see alot of quadratic forumla in my future

140. anonymous

lol

141. anonymous

142. anonymous

there are multiple variables so i can do the quadatic, even after factoring out some things

143. anonymous

do you think it would be better to take the graident of f(x,z)

144. anonymous

might be a little easier but not much easier. i'm looking at a $5x^3-3x^2-50$ for this one

145. anonymous

a $5x^3-3x^2-50=0$

146. anonymous

a calculator might solve it...

147. anonymous

where does that come from?

148. anonymous

$f _{x}=25z^3-2z^5x-x^3z^3=0 => f_{x}=25-2z^2x-x^3$

149. anonymous

yeah i see that

150. anonymous

$f_{z}=75xz^2-10z^4x-3x^3z^2=0 => f_{z}=75-10z^2-3x^2$

151. anonymous

the last part was $-3x^2$

152. anonymous

if you solve that, eliminate $z$ by multiplying the first with -5 and adding both equations you get what i got.

153. anonymous

check my work, i may have made an algebraic error while I double check this langrage business

154. anonymous

at the very least, you'll have an answer for this question and then we can worry about the method.

155. anonymous

i am not seeing the x^3 is coming from

156. anonymous

in which partial?

157. anonymous

x or z?

158. anonymous

no when i added the 2 i got 12x^2 - 50

159. anonymous

in the fx why did you not factor out z^3

160. anonymous

I did. look at the part after the => sign

161. anonymous

am I missing something here? plz do let me know, I could have easily made a mistake...

162. anonymous

btw, I admire your persistence. I know you could say the same for me but I enjoy this kind of thing. Usually I enjoy working on challenging and interesting problems, but I didn't when I was a student. I did, but I didn't put in the work. so good job thus far.

163. anonymous

by the way, I have a problem here in my book which is a superb example for solving this problem with lagrange multipliers. I don't have a scan, but I can take a pic with my camera. so if you'd like you can send your email so i can forward it to you.

164. anonymous

lets start with the basics f(x,z)=$25xz^3-2z^5x-x^3z^3$

165. anonymous

166. anonymous

fx=$25z^3-2z^5-3x^2z^3$

167. anonymous

fx=$z^3(25-2z^2-3x^2)$

168. anonymous

btw, what you typed in earlier: f (xyz) =xyz + (2xz + 4yz + 8xy − C) does this formula seem familiar. this is what we'll end up referring back to for the langrage.

169. anonymous

was that in your notes somewhere?

170. anonymous

fz=$75xz^2-10z^4x-3x^3z^2$

171. anonymous

that was from a volume equation the variables were off, dont think it matters

172. anonymous

fz=$xz^2(75-10z^2-3x^2)$

173. anonymous

i see the problem in the book but i guess i am having trouble seeing what to do with what i find

174. anonymous

so you have the example to a similar problem as well that is being solved using Lagrange Multipliers?

175. anonymous

by the way, the x^3 came from the original fx that you gave me. I didn't check it. if it was true, that's where the x^3 was coming from.

176. anonymous

must have been a type, there shouldn't be a x^3. just checked.

177. anonymous

yea, so it should nicely reduce then

178. anonymous

okay

179. anonymous

so i got 12x^2-50

180. anonymous

so then it is x=$\sqrt{50}/12$

181. anonymous

$5\sqrt{2}/12$

182. anonymous

183. anonymous

184. anonymous

right, but now you plug the value of x into one of them to solve for z as well. remember?

185. anonymous

sorrying multiply -5 to fx

186. anonymous

so plug in the $5\sqrt{2}/12$ to the orignal functions

187. anonymous

and solve for z?

188. anonymous

right

189. anonymous

this number is nasty

190. anonymous

it shouldn't be

191. anonymous

maybe i am doing poor algebra, wait do i plug it into f(x,y,z) or f(x,z)

192. anonymous

into f(x,z)

193. anonymous

$f_{x}=25-2z^2-3x^2$ and $f_{z}=75-10z^2-3x^2$

194. anonymous

$\sqrt{50}/12(25-2z^2-(\sqrt{50}/12)^2)z^3$

195. anonymous

subtract those two: $f_{z}-f_{x} = 50-8z^2$

196. anonymous

haha so much easier

197. anonymous

5/2

198. anonymous

that's right. now plug that into either fx or fz

199. anonymous

so if i plugged the z value into fx, i would solve for X?

200. anonymous

right

201. anonymous

what do you have for me?

202. anonymous

you realize that once you get the x we'll now have x and z, and remember the expression of y you got earlier by solving for y? well, if you go and plug this x and z in it, you'll have the y which will give you a point in 3D (x,y,z) and that will be the solution!

203. anonymous

I just got through looking at the Lagrange and it is considerably easier once you get it. let me know when you're ready to move on.

204. anonymous

the x is difficult because of the fractions

205. anonymous

It's nearing 11 o'clock my time, so we'll have to hurry up a bit :)

206. anonymous

awww, not a fan of fractions are ya? no worries

207. anonymous

just teasin' by the way,

208. anonymous

i agree i am about done

209. anonymous

so let's figure out this fraction business

210. anonymous

$f_{x,z=5/2}=25-2(5/2)^2-3x^2x$

211. anonymous

simplying gives us: $0=25-25/2-3x^2=50/2-25/2-3x^3$

212. anonymous

50/2-25/2=25/2, right?

213. anonymous

because you get (50-25)/2=25/2

214. anonymous

so we now have $25/2-3x^2=0 => 25/2=3x^2$

215. anonymous

you can get x from there

216. anonymous

$\{5}/6$

217. anonymous

5/6

218. anonymous

not exactly...

219. anonymous

sorry my brain is fried the whole thing must be squared

220. anonymous

exactly

221. anonymous

don't worry, that makes two of us

222. anonymous

$\sqrt{25/6}$

223. anonymous

which simplifies to...

224. anonymous

$5/\sqrt{6}$

225. anonymous

yes, but by convention you don't leave a radical in the bottom so you...

226. anonymous

multiply both top and both by the same radical and you get...

227. anonymous

$5\sqrt{6}/6$

228. anonymous

that's it

229. anonymous

now, if we didn't make any stupid mistakes along the way, those two should be two of the 3 you need to make a point in 3D

230. anonymous

now plug all three into the equation

231. anonymous

now plug those into the y expression you got earlier and you should get the third point to form (x,y,z)

232. anonymous

once you have the point, that's it. that should be the optimal point you were looking for to satisfy whatever the problem was asking you to satisfy in real life

233. anonymous

now onto lagrange: given $f(x,y,z)$, and the constraint $x^2+y^2+2z^2=25$, let $g(x,y,z)=x^2+y^2+2z^2-25$. Now, all the wise Lagrange himself said was that given that the gradient of $g(x,y,z$ neve equals zero, there exist a constant such that the gradient of $f(x,y,z)$ equals the constant times the gradient of $g(x,y,z)$.

234. anonymous

okay

235. anonymous

first, you know now how you're gonna get the y?

236. anonymous

and at least have your optimal point? before we do this now. we're just gonna quickly set up the equations and I'm gonna hit the pellets

237. anonymous

*sheets

238. anonymous

yeah y=$\sqrt{25/3}$

239. anonymous

or $5\sqrt{3}/3$

240. anonymous

sweet. i haven't checked it. make sure all the algebra's right.

241. anonymous

go ahead and go to sleep i appreciate all your help, it was above the call of duty

242. anonymous

do you see how I wrote the constraint as the function g(x,y,z) ?

243. anonymous

yes

244. anonymous

so langrage gives you a bunch of easy equations to solve: here they are:

245. anonymous

he says that there exists a constant, $lambda$ that when multiplied by the constraint, you get the solution. interesting man

246. anonymous

okay

247. anonymous

so here are the equations: fx = lambda*gx, fy = lambda*gy, fz = lambda*gz, and finally, we have our constraint: g(x)=0;

248. anonymous

lambda as I am using it here is of course $\lambda$

249. anonymous

with the g(x,y,z)=0 we have 4 equations which is great because we have 4 variables: x,y,z, and $\lambda$

250. anonymous

so take the partial of gx, gy, gz and solve for lambda

251. anonymous

that is exactly correct! of course you'll also be taking partials of fx,fy,and fz but remember that here we're talking about the original $f(x,y,z)=xy^2z3$

252. anonymous

yes! awesome, i got it! thank you so much for your help

253. anonymous

in the process you'll solve for the lambda, x,y, and z. you're interested in the x,y,and z and if we did everything right, they should match what we got earlier.

254. anonymous

i understand it know thanks so much

255. anonymous

good to know where everything comes from

256. anonymous

or that there are easier ways of getting things done :)

257. anonymous

if i ever get stuck can i email you?

258. anonymous

you're welcome. you have my email, shoot me one if you ever need some more help. i don't visit here often.

259. anonymous

you beat me to it; absolutely.

260. anonymous

thank you very much

261. anonymous

aite man, ciao

262. anonymous

sleep well

263. anonymous

thank you