<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Motivation &#8211; Henry Poon&#039;s Blog</title>
	<atom:link href="https://blog.henrypoon.com/blog/tag/motivation/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.henrypoon.com</link>
	<description></description>
	<lastBuildDate>Mon, 03 Oct 2022 04:52:34 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
<site xmlns="com-wordpress:feed-additions:1">83044199</site>	<item>
		<title>&#8220;The Cyclist&#8217;s Training Bible&#8221; by Joe Friel &#8211; Chapter 1 summary &#8211; Mental performance</title>
		<link>https://blog.henrypoon.com/blog/2020/05/02/the-cyclists-training-bible-by-joe-friel-chapter-1-summary-mental-performance/</link>
					<comments>https://blog.henrypoon.com/blog/2020/05/02/the-cyclists-training-bible-by-joe-friel-chapter-1-summary-mental-performance/#respond</comments>
		
		<dc:creator><![CDATA[hp]]></dc:creator>
		<pubDate>Sun, 03 May 2020 04:55:37 +0000</pubDate>
				<category><![CDATA[books]]></category>
		<category><![CDATA[APT]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[Books]]></category>
		<category><![CDATA[Chan]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[Cycling]]></category>
		<category><![CDATA[D]]></category>
		<category><![CDATA[Dream]]></category>
		<category><![CDATA[Drive]]></category>
		<category><![CDATA[EAR]]></category>
		<category><![CDATA[Effects of fatigue on safety]]></category>
		<category><![CDATA[Family]]></category>
		<category><![CDATA[Fatigue]]></category>
		<category><![CDATA[Find]]></category>
		<category><![CDATA[food]]></category>
		<category><![CDATA[Go]]></category>
		<category><![CDATA[Humans]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[IME]]></category>
		<category><![CDATA[ise]]></category>
		<category><![CDATA[It]]></category>
		<category><![CDATA[Joe Friel]]></category>
		<category><![CDATA[Lie]]></category>
		<category><![CDATA[Mechanics]]></category>
		<category><![CDATA[Mental health]]></category>
		<category><![CDATA[Mental toughness]]></category>
		<category><![CDATA[Mind]]></category>
		<category><![CDATA[Motivation]]></category>
		<category><![CDATA[Net]]></category>
		<category><![CDATA[Object]]></category>
		<category><![CDATA[Over]]></category>
		<category><![CDATA[Physical exercise]]></category>
		<category><![CDATA[Physical fitness]]></category>
		<category><![CDATA[Port]]></category>
		<category><![CDATA[rain]]></category>
		<category><![CDATA[Sleep]]></category>
		<category><![CDATA[Team]]></category>
		<category><![CDATA[The Go]]></category>
		<category><![CDATA[Time]]></category>
		<category><![CDATA[When We]]></category>
		<guid isPermaLink="false">https://blog.henrypoon.com/?p=5869</guid>

					<description><![CDATA[This is summary of chapter 1 of Joe Friel&#8217;s &#8220;The Cyclist&#8217;s Training Bible&#8221;. This chapter discusses the mental component of high performance cycling. For best results, training should be considered a full time job. One&#8217;s entire lifestyle must be directed towards this objective. This lifestyle will also require following the correct training program religiously over [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">This is summary of chapter 1 of Joe Friel&#8217;s &#8220;The Cyclist&#8217;s Training Bible&#8221;.  This chapter discusses the mental component of high performance cycling.</p>



<p class="wp-block-paragraph">For best results, training should be considered a full time job. One&#8217;s entire lifestyle must be directed towards this objective. This lifestyle will also require following the correct training program religiously over time.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>All athletes are limited more by their minds more than their bodies</p></blockquote>



<p class="wp-block-paragraph">One needs to develop a winning attitude. One needs to combine physical fitness with mental fitness.</p>



<p class="wp-block-paragraph">This chapter touches on a few mental opportunities for success:</p>



<ul class="wp-block-list"><li>Motivation &#8211; Competitive cycling demands an inner drive to excel. Everything in your life must be focused on the goal</li><li>Dreams, goals, and missions &#8211; high performance starts with a dream. This turns into a goal, and ultimately the mission. Are you willing to make any sacrifice, ride any number of miles, or do any workouts deemed beneficial to achieving the goal?</li><li>Believe to achieve &#8211; there are bound to be setbacks. One needs to remain confident, patient and mentally tough to power through. Relive each day&#8217;s wins, big or small to boost self-confidence</li><li>Mental toughness &#8211; when we&#8217;re at our limits, fatigue sets in, and the mind tries to make compromises. A fully committed rider gets through it</li><li>Patience &#8211; success won&#8217;t come quickly. We can introduce incremental change, like: sleeping 30 minutes earlier each day, cutting out 10% of junk food from our diets, etc.</li><li>Commitment and tenacity &#8211; there are moments where fatigue says to stop, but the fully commited and tenacious rider finds a way to keep going</li><li>Consistency and routines &#8211; the mind and body like regular and standard schedules. Things like jobs, families, and other responsibilities may interfere</li><li>Your high-performance team &#8211; surrounding each champion is a network of family, friends, teammates, coaches, etc.</li></ul>



<p class="wp-block-paragraph">This topic can get rather deep, so there is value in reading other books on the subject and speaking with other successful professionals from all walks of life.</p>



<p class="wp-block-paragraph">By improving one&#8217;s mental approach to cycling, their training and racing will benefit greatly too.</p>



<p class="wp-block-paragraph">Next: <a rel="noreferrer noopener" href="https://blog.henrypoon.com/blog/2020/05/12/the-cyclists-training-bible-by-joe-friel-chapter-2-summary-physical-performance/" target="_blank">Chapter 2 – Physical performance</a><br>Chapter list: <a href="https://blog.henrypoon.com/blog/2020/05/02/the-cyclists-training-bible-by-joe-friel-chapter-summaries/" target="_blank" rel="noreferrer noopener">Chapter summaries</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.henrypoon.com/blog/2020/05/02/the-cyclists-training-bible-by-joe-friel-chapter-1-summary-mental-performance/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5869</post-id>	</item>
		<item>
		<title>Taking Control of Your Sleep Routine</title>
		<link>https://blog.henrypoon.com/blog/2012/12/14/taking-control-of-your-sleep-routine/</link>
					<comments>https://blog.henrypoon.com/blog/2012/12/14/taking-control-of-your-sleep-routine/#comments</comments>
		
		<dc:creator><![CDATA[hp]]></dc:creator>
		<pubDate>Sat, 15 Dec 2012 06:47:06 +0000</pubDate>
				<category><![CDATA[health]]></category>
		<category><![CDATA[Biology]]></category>
		<category><![CDATA[Branches of biology]]></category>
		<category><![CDATA[Chan]]></category>
		<category><![CDATA[Click]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[Competition]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[Const]]></category>
		<category><![CDATA[D]]></category>
		<category><![CDATA[EAR]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[Final]]></category>
		<category><![CDATA[Find]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[German]]></category>
		<category><![CDATA[Germany]]></category>
		<category><![CDATA[Go]]></category>
		<category><![CDATA[Health]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[IME]]></category>
		<category><![CDATA[It]]></category>
		<category><![CDATA[Lie]]></category>
		<category><![CDATA[Management]]></category>
		<category><![CDATA[Mind]]></category>
		<category><![CDATA[Motivation]]></category>
		<category><![CDATA[Nap]]></category>
		<category><![CDATA[Neuroscience]]></category>
		<category><![CDATA[Neuroscience of sleep]]></category>
		<category><![CDATA[Over]]></category>
		<category><![CDATA[RAR]]></category>
		<category><![CDATA[Sleep]]></category>
		<category><![CDATA[Sleep and weight]]></category>
		<category><![CDATA[Sleep debt]]></category>
		<category><![CDATA[Sleep deprivation]]></category>
		<category><![CDATA[STR]]></category>
		<category><![CDATA[Søvnen]]></category>
		<category><![CDATA[Thou]]></category>
		<category><![CDATA[Time]]></category>
		<category><![CDATA[Time management]]></category>
		<category><![CDATA[Urge]]></category>
		<category><![CDATA[Z]]></category>
		<guid isPermaLink="false">http://henrypoon.mooo.com/blog/taking-control-of-your-sleep-routine</guid>

					<description><![CDATA[I think I speak for a lot of people when I say that we aren&#8217;t getting enough sleep. &#160;We&#8217;re always worried about our next deadline and other things we have to do. &#160;Sleep somehow always becomes a lower priority. &#160;After a while of consistently sleeping less and less, we&#8217;ve forgotten what it felt like to [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">I think I speak for a lot of people when I say that we aren&#8217;t getting enough sleep. &nbsp;We&#8217;re always worried about our next deadline and other things we have to do. &nbsp;Sleep somehow always becomes a lower priority. &nbsp;After a while of consistently <a class="zem_slink" title="Sleep" href="http://en.wikipedia.org/wiki/Sleep" target="_blank" rel="noopener wikipedia noreferrer">sleeping</a> less and less, we&#8217;ve forgotten what it felt like to be fully rested all the time, except on the odd day where we sleep-in for 12 hours. &nbsp;It doesn&#8217;t have to be this way.</p>



<p class="wp-block-paragraph">Personally, I simply got tired of sleeping so little. &nbsp;I always sacrificed sleep for more work time in the past. &nbsp;But now, I&#8217;ve come to realize how powerful being rested really is. &nbsp;It feels so empowering when I wake up in the morning, fully refreshed. &nbsp;I don&#8217;t have to struggle to get out of bed or set 5 alarm clocks to get me out of bed in the morning. &nbsp;The reason that the struggle exists is because the body wants more sleep. &nbsp;This is a clear sign of not sleeping enough. &nbsp;I&#8217;m definitely no sleep expert and I don&#8217;t claim to be, but I thought I&#8217;d share some techniques in how to think differently about sleep. &nbsp;But first, I think I should share my experience with sleep deprivation, which I felt heavily motivated me into adopting this way of life. &nbsp;All of this below is just my view on sleep health.</p>



<h1 class="wp-block-heading">My Battle with <a class="zem_slink" title="Sleep deprivation" href="http://en.wikipedia.org/wiki/Sleep_deprivation" target="_blank" rel="noopener wikipedia noreferrer">Sleep Deprivation</a></h1>



<p class="wp-block-paragraph">In high school, I pretty much got 8 hours of sleep a night. &nbsp;It wasn&#8217;t that hard since at that time I didn&#8217;t really think about optimizing my sleep. &nbsp;I just remember being nagged to go to sleep by my parents every night. &nbsp;I never had to stay up doing any homework or anything like that. &nbsp;Even my first year of university was like that. &nbsp;Rarely found myself staying up to do work unless there was a exam the next day or something.</p>



<p class="wp-block-paragraph">Second year of university is when it all changed. &nbsp;A thought clicked in my head that I could&nbsp;sleep less and get more work done. &nbsp;It&#8217;s not like I felt sleepy at night anyways. &nbsp;For a while it was alright, but then as I slept less and less, my <a class="zem_slink" title="Sleep debt" href="http://en.wikipedia.org/wiki/Sleep_debt" target="_blank" rel="noopener wikipedia noreferrer">sleep debt</a> accumulated. &nbsp;<strong>I found myself napping in class. &nbsp;I even micro-slept while I drove and almost got into not one, but a couple car accidents. &nbsp;</strong>I didn&#8217;t try to do anything about it at the time. &nbsp;I liked the extra time. &nbsp;There was a while where I slept about 4.5 hours a night because I stayed up playing computer games. &nbsp;I looked like a zombie. &nbsp;I yawned all the time and everyone knew I was sleepy.</p>



<p class="wp-block-paragraph">In my third year, I lived alone on campus. &nbsp;No one told me when to wake up to go to class. &nbsp;With all the sleep debt I had, <strong>I struggled to get up every morning.</strong> &nbsp;Eventually, <strong>I stopped going to morning classes altogether and my grades suffered</strong>. &nbsp;I started questioning myself, &#8220;why is it so hard to sleep early?&#8221; &nbsp;<strong>I was easily annoyed all the time</strong><strong>. &nbsp;</strong>I was so tired at one point, that&nbsp;<strong>I caught myself hallucinating</strong>. &nbsp;It was weird because I saw this strange bug crawling up the curtain and when I waved the curtain around, it was gone. &nbsp;I couldn&#8217;t find it anywhere on the floor. &nbsp;I wanted to change my sleeping habits, but I couldn&#8217;t do it. &nbsp;Logic told me to do it, but I couldn&#8217;t act on it.</p>



<p class="wp-block-paragraph">My sleeping habits didn&#8217;t change until I went to Germany for my co-op work term. &nbsp;I guess because I was adjusting to this new environment, I actually felt sleepy at night. &nbsp;This urge made me sleep a lot earlier than what I was used to doing. &nbsp;I felt rested for the first time in a long time. &nbsp;It felt so good. &nbsp;My constant zombie look faded away. &nbsp;I could tell that my skin complexion was improving.</p>



<p class="wp-block-paragraph">I guess because I&#8217;ve seen how dangerous sleep deprivation could be, it finally compelled me to change my ways. &nbsp;Ever since I&#8217;ve made sleep a priority, I feel a lot healthier. &nbsp;I lose out on wake-time for working, but I am able to think better when I am rested. &nbsp;My thoughts are a lot clearer. &nbsp;That makes me a more efficient worker.</p>



<h1 class="wp-block-heading">Getting into the Frame of Mind</h1>



<p class="wp-block-paragraph"><strong>You&#8217;ve got to be truly convinced that you&nbsp;<em>want</em>&nbsp;to get more sleep</strong>. &nbsp;I know a lot of people who say things &#8220;yeah I know I don&#8217;t get enough sleep&#8221;, but they don&#8217;t do anything about it. &nbsp;Nothing at all. &nbsp;Everyday they keep their usual sleep routine and they&#8217;re struggling all the time. &nbsp;They&#8217;re the ones who are always late to morning appointments, and some even for afternoon appointments. &nbsp;Why does it have to be that way? &nbsp;It doesn&#8217;t. &nbsp;But before even trying to maintain a proper sleep routine, people really have to change the way they think about sleep.</p>



<p class="wp-block-paragraph"><strong>Sleep is NOT<em> </em>a waste of time. </strong>I&#8217;ve heard people say, &#8220;sleep is a waste of time&#8221; or &#8220;sleep is for the weak&#8221;.  It definitely is not.  Somehow I think there is a competition between who gets the least amount of sleep and still gets the most work done.  I&#8217;ve heard people people saying (sometimes bragging) stuff like how they got only 3 hours of sleep and then pulled an all-nighter to study for an exam.  Sure, they definitely were up for a while, but should we question the efficiency of that work?  Of course.  Anybody who has pulled an all-nighter has experiences how &#8220;out of it&#8221; they were by the end if not half way through.  Nobody <em>wants</em> to do an all-nighter.  That is an extreme case though.  A more common theme is to stay up for 18 hours or so.  That leaves 6 hours to sleep.  The average for most people lies somewhere around 7.5-8 hours.  According to the statistics, more than half of us need more than 6.  By not getting our required amount of sleep, this so-called &#8220;<a href="http://en.wikipedia.org/wiki/Sleep_debt" target="_blank" rel="noreferrer noopener">sleep debt</a>&#8221; will accumulate over time.  Like I mentioned before, I once slept on average 4.5 to 5 hours a night for about 3 months straight.  People around me could tell I looked like a zombie.  I&#8217;ve definitely experienced sleep debt first hand.  In retrospect, doing this was so stupid, but that experience definitely helped me reshape what I thought about sleep.  It is a necessity.</p>



<p class="wp-block-paragraph"><strong>Getting into the right frame of mind takes time. &nbsp;</strong>I definitely did not just one day choose to make sleep a priority. &nbsp;It happened over time. &nbsp;For me it took a few years in order for me to drill it into my head. &nbsp;After sleeping late and waking up early, I&#8217;d ask myself why I did that. &nbsp;Why did I sleep so little the night before when the consequence was me feeling sleep deprived the day after? &nbsp;As I&#8217;m in my early 20&#8217;s, sleeping late is easy. &nbsp;It&#8217;s not difficult to just stay up late doing nothing in particular. &nbsp;In fact, it seems to be natural tendency for most people in my age group to be <a class="zem_slink" title="Night owl (person)" href="http://en.wikipedia.org/wiki/Night_owl_%28person%29" target="_blank" rel="noopener wikipedia noreferrer">night owls</a>.</p>



<p class="wp-block-paragraph"><strong>Going to bed early is not a chore. </strong>&nbsp;Chores are something we&#8217;d rather not do, but we&#8217;re only doing it because we have to. &nbsp;This attitude will not work. &nbsp;Eventually, you&#8217;ll give up&nbsp;and revert to your old ways. &nbsp;You have to change your attitude toward sleep. &nbsp;You know how some people feel passionate about their work and will always feel motivated to do it? &nbsp;That&#8217;s their motivation. &nbsp;There is a similar motivation for sleeping early. &nbsp;I want to go to sleep early today, so I feel rested and ready to go tomorrow.</p>



<p class="wp-block-paragraph"><strong>Ask yourself why your sleep habits are the way they are right now.</strong> &nbsp;Why do I have to wake up feeling terrible every morning? &nbsp;Why do I have to set so many alarms just to get out of bed? &nbsp;Why am I pressing the snooze button so much? &nbsp;Shouldn&#8217;t I be getting up super early? Doesn&#8217;t this struggle to wake up give me less time to get ready? &nbsp;If I don&#8217;t have enough time to get ready, won&#8217;t I look like a mess when I go to work/school? &nbsp;Am I sleeping late all the time because I have so much work to do? &nbsp;Could I be improving on my time management to make me more efficient? Is sleeping late worth it? &nbsp;I&#8217;m sure there are way more questions to be asked, but asking yourself these questions will tell you how you really feel about it. &nbsp;Everyone&#8217;s going to have different answers. &nbsp;Some might want to change, but others might feel that what they&#8217;re doing is the best solution right now.</p>



<h1 class="wp-block-heading">The Bottom Line</h1>



<p class="wp-block-paragraph">Sleep is absolutely essential for good health and its benefits are far reaching. &nbsp;Ever since I&#8217;ve slept better, I&#8217;ve been able to accomplish more. &nbsp;No longer am I the sleep deprived zombie. &nbsp;My grades in school are better despite harder courses and more commitments. Better sleep health is something that anybody can do, but they have to want it. &nbsp;You have to convince yourself that sleep deprivation is a terrible thing and it is something to avoid. &nbsp;You&#8217;ve got to get into the frame of mind that sleep health is good and the will to change. &nbsp;If you truly want to improve your sleep habits for the better, the improvements will happen.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.henrypoon.com/blog/2012/12/14/taking-control-of-your-sleep-routine/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1583</post-id>	</item>
		<item>
		<title>Numerical Methods for Non-Linear Optimization</title>
		<link>https://blog.henrypoon.com/blog/2011/01/29/numerical-methods-for-non-linear-optimization/</link>
					<comments>https://blog.henrypoon.com/blog/2011/01/29/numerical-methods-for-non-linear-optimization/#comments</comments>
		
		<dc:creator><![CDATA[hp]]></dc:creator>
		<pubDate>Sat, 29 Jan 2011 17:55:33 +0000</pubDate>
				<category><![CDATA[computer stuff]]></category>
		<category><![CDATA[Algebra]]></category>
		<category><![CDATA[Calculus]]></category>
		<category><![CDATA[Chan]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Contents]]></category>
		<category><![CDATA[D]]></category>
		<category><![CDATA[Dime]]></category>
		<category><![CDATA[EAR]]></category>
		<category><![CDATA[Equation solving]]></category>
		<category><![CDATA[Equations]]></category>
		<category><![CDATA[Fields of mathematics]]></category>
		<category><![CDATA[Final]]></category>
		<category><![CDATA[Find]]></category>
		<category><![CDATA[Go]]></category>
		<category><![CDATA[Gradient descent]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[IME]]></category>
		<category><![CDATA[Introduction]]></category>
		<category><![CDATA[It]]></category>
		<category><![CDATA[Lie]]></category>
		<category><![CDATA[Mathematical optimization]]></category>
		<category><![CDATA[Mathematics]]></category>
		<category><![CDATA[MATLAB]]></category>
		<category><![CDATA[Motivation]]></category>
		<category><![CDATA[Numerical analysis]]></category>
		<category><![CDATA[Numerical partial differential equations]]></category>
		<category><![CDATA[Partial differential equation]]></category>
		<category><![CDATA[Plan]]></category>
		<category><![CDATA[Plug]]></category>
		<category><![CDATA[Rolling]]></category>
		<category><![CDATA[STR]]></category>
		<category><![CDATA[Thou]]></category>
		<category><![CDATA[Time]]></category>
		<category><![CDATA[Travel]]></category>
		<category><![CDATA[tuna]]></category>
		<category><![CDATA[UNC]]></category>
		<category><![CDATA[Unification]]></category>
		<category><![CDATA[Variable]]></category>
		<category><![CDATA[Vol]]></category>
		<category><![CDATA[Z]]></category>
		<guid isPermaLink="false">http://henrypoon.mooo.com/blog/numerical-methods-for-non-linear-optimization</guid>

					<description><![CDATA[Contents Introduction Motivation Newton’s Method Steepest Descent Method Limitation Sources Introduction In many sciences, the problem of non-linear optimization appears quite often.&#160; What happens if they’re non-linear?&#160; Sometimes, the system of equations remains easy to solve even given non-linearity, but other times, the possibility of solving the problem analytically may not exist if the algebra [&#8230;]]]></description>
										<content:encoded><![CDATA[<h1>Contents</h1>
<ul>
<li>Introduction</li>
<li>Motivation</li>
<li>Newton’s Method</li>
<li>Steepest Descent Method</li>
<li>Limitation</li>
<li>Sources</li>
</ul>
<h1>Introduction</h1>
<p>In many sciences, the problem of non-linear optimization appears quite often.&nbsp; What happens if they’re non-linear?&nbsp; Sometimes, the system of equations remains easy to solve even given non-linearity, but other times, the possibility of solving the problem analytically may not exist if the algebra gets too complicated.&nbsp; The solution lies in using numerical methods (approximations).&nbsp; Here, I present two common methods: Newton’s Method, and the Steepest Descent Method.&nbsp;</p>
<p>Each method has its own limitations and the choice of which method to use depends on the problem.&nbsp; These methods involve using iterative computation in order to reach a solution.&nbsp; Luckily, computers can prove useful in providing solutions very quickly due to its quick processing power for numerical computation.</p>
<p>In order to understand some of the concepts and terms used in this article, the reader has knowledge in multivariable calculus.&nbsp; Also, equations in picture form made the line spacing look funny, so I’m going to do my best write the equations as text.&nbsp; I should also point out that I couldn’t write the vector arrow on top of the variables in text form so vectors are written in bold.</p>
<h1>Motivation</h1>
<p>In calculus, the idea of optimization involves taking the derivative of the function and equating it to zero.&nbsp; In multivariable calculus, the same idea applies except, we set all the partial derivatives to zero and solve the system.</p>
<p>So in general, if we are given a function:</p>
<p align="center"><em>ƒ(<strong>x</strong>)</em>, where <strong>x</strong> = [x<sub>1</sub>, x<sub>2</sub>, … x<sub>n</sub>]<sup>T</sup></p>
<p>The maximum or minimum can be found by taking a partial derivative with respect to the vector <strong><em>x</em></strong>.&nbsp; This gives the following equations:</p>
<p align="center"><em>∂<em>ƒ</em>/dx<sub>1</sub> = 0</em></p>
<p align="center"><em>∂<em>ƒ</em>/dx<sub>2</sub> = 0</em></p>
<p align="center">…</p>
<p align="center"><em>∂<em>ƒ</em>/dx<sub>n</sub> = 0</em></p>
<p>A short-hand way of expressing the above equations is by using the gradient vector, giving<em>∇ƒ(<strong>x</strong>) = <strong>0</strong></em>.&nbsp; By definition, the gradient is defined by:</p>
<p align="center"><em>∇ƒ(<strong>x</strong>) = [<em>∂<em>ƒ</em>/dx<sub>1</sub>, ∂<em>ƒ</em>/dx<sub>2</sub></em>, … , <em>∂<em>ƒ</em>/dx<sub>n</sub></em>].</em></p>
<p>An analytical solution is not always possible, hence the motivation for approximating the solution using numerical methods.</p>
<h1>Newton’s Method</h1>
<p>In general, this method is written below.&nbsp; Explanation of each step will follow.</p>
<ol>
<li>Given the equations to solve, derive equations for the approximating line or plane, depending on whether the problem is 2D, 3D, nD, etc.</li>
<li>Using the linearized equations, solve the system of equations</li>
<li>Using the results from step 2, generate new equations for a new approximating line or plane, and repeat step 2.</li>
</ol>
<p>This method also involves starting with a guess, denoted by a variable with a subscript of 0.&nbsp; A guess is required, because this is the starting point for this method.&nbsp; Using this guess, each successive solution <em>should</em> converge (more on that later).</p>
<h2>Step 1</h2>
<p>In order to solve the equations <em>∇ƒ(<strong>x</strong>) = <strong>0</strong></em> (see Motivation for more information), we can apply multivariate Newton’s method to approximate the solution.&nbsp; Like the single-variate (two-dimensional) version, a linear approximation is required.&nbsp; However, instead of having an approximation in the form of a line, the approximation is a plane instead.</p>
<p align="center">2D (line): <em>ƒ(x) ≈ ƒ(x<sub>0</sub>) + ƒ’(x<sub>0</sub>)(x &#8211; x<sub>0</sub>)</em></p>
<p align="center">3D (plane): <em>ƒ(x, y) ≈ ƒ(x<sub>0</sub>, y<sub>0</sub>) + ƒ<sub>x</sub>(x<sub>0</sub>, y<sub>0</sub>)(x &#8211; x<sub>0</sub>) + ƒ<sub>y</sub>(x<sub>0</sub>, y<sub>0</sub>)(y &#8211; y<sub>0</sub>)</em></p>
<p align="center">nD (nD plane): <em>ƒ(<strong>x</strong>) ≈ ƒ(<strong>x<sub>0</sub></strong>) + <em>∇ƒ(<strong>x<sub>0</sub></strong>)(<strong>x</strong> &#8211; <strong>x<sub>0</sub></strong>)</em></em></p>
<p>Since we are trying to optimize, we have the partial derivatives of the function we are trying to optimize, but in order to apply Newton’s Method, we need a linear approximation of the partial derivatives.&nbsp; This means that in order to approximate the partial derivatives, we need to take another derivative in order to get the slopes of the approximating planes.&nbsp; If that description didn’t make sense, try the following.&nbsp; For an equation with two independent variables, there will be two equations for the partial derivatives, one for x and one for y.&nbsp; Taking partial derivatives from each of those equations again will give the slopes of the plane that approximate the first partial derivative.&nbsp; So if we have two independent variables, we end up getting four equations: ƒ<sub>xx</sub>, ƒ<sub>xy</sub>,ƒ<sub>yy</sub>, and ƒ<sub>yx</sub> (ƒ<sub>xy </sub>and ƒ<sub>yx</sub> should be the same).&nbsp; In general, for n partial derivatives, we would have <em>n²</em> equations if we took another set of derivatives.&nbsp; The approximations for both of the partial derivatives would be:</p>
<p align="center"><em>ƒ<sub>x</sub>(x, y) ≈ <em>ƒ<sub>x</sub></em>(x<sub>0</sub>, y<sub>0</sub>) + ƒ<sub>xx</sub>(x<sub>0</sub>, y<sub>0</sub>)(x &#8211; x<sub>0</sub>) + ƒ<sub>xy</sub>(x<sub>0</sub>, y<sub>0</sub>)(y &#8211; y<sub>0</sub>)</em></p>
<p align="center"><em>ƒ<sub>y</sub>(x, y) ≈ <em>ƒ<sub>y</sub></em>(x<sub>0</sub>, y<sub>0</sub>) + ƒ<sub>yy</sub>(x<sub>0</sub>, y<sub>0</sub>)(x &#8211; x<sub>0</sub>) + ƒ<sub>yx</sub>(x<sub>0</sub>, y<sub>0</sub>)(y &#8211; y<sub>0</sub>)</em></p>
<p align="left">Plug in the values for the second derivatives, and the values from the initial guess (the x y values and what function value you get using those values).</p>
<h2>Step 2</h2>
<p>Although the equations generated from step 1 is yet another system of equations, the main difference is that the equations from step 1 are <strong>linear</strong>.&nbsp; This means that the system can be solved analytically.&nbsp; Solve for the solution of the system using <a href="http://en.wikibooks.org/wiki/Linear_Algebra/Row_Reduction_and_Echelon_Forms" target="_blank" rel="noopener noreferrer">row reduction methods</a>, or other methods.&nbsp; The solution from solving the system will be the values used for the next iteration and will replace the guessed values.&nbsp; The solution may or may not be close to the actual solution.&nbsp; More iterations need to be done to see if the answer changes with each iteration.&nbsp; Usually if the guess is really far away, then it takes a lot of iterations to get it really close.&nbsp; However, sometimes, a bad guess may cause the solution to diverge, meaning that the solution will be further and further off.</p>
<h2>Step 3</h2>
<p>Generate new equations for the approximating planes using the solution from step 2.&nbsp; Using these equations, go back to step 2 and solve it again.&nbsp; This method is super tedious if done on paper.&nbsp; Matlab can help, but then again, Matlab can do the entire approximation with just a few commands, but not everyone has access to it unfortunately.</p>
<p>Hopefully after a few iterations, the solution stops changing.&nbsp; When that happens, you can substitute the final solution back into the original equation to see if it works!</p>
<h1>Steepest Descent Method</h1>
<p>Here is the general method:</p>
<ol>
<li>Find the direction of the maximum or minimum directional derivative</li>
<li>Follow it until a maximum or minimum is reached</li>
</ol>
<p>Newton’s Method is sufficient in a lot of cases, but sometimes it may be too hard to go beyond first derivatives.&nbsp; This main idea of this method is to use the first derivative and follow the direction in which the function gets larger/smaller.&nbsp; A fundamental concept used in this method is the directional derivative.&nbsp; Since in 3D (or higher dimensions), we are not restricted to movement along the x axis.&nbsp; This means we could move in any random direction, and in each direction the rate of change is going to be different.&nbsp; To calculate the max or min, we need to calculate where the directional derivative is largest or smallest.&nbsp; Just like a boulder rolling down the steepest slope on the hill.</p>
<p>Starting with a guess, we can find out the value of the function at the point and the direction to travel in.&nbsp; Take a step in that direction and see how the value of the function changed.&nbsp; Keep doing that until a max or min is reached.</p>
<h2>Step 1</h2>
<p>The definition of the directional derivative is the dot product of the gradient and the unit vector specifying the direction.&nbsp; Here is the definition of the directional derivative:</p>
<p align="center"><em>D<sub>u</sub>ƒ = ∇ƒ(<strong>x</strong>)<strong>·u</strong></em></p>
<p align="left">Since the definition involves a dot product, it is true that if the two vectors are orthogonal, the resulting dot product is zero.&nbsp; The direction that this derivative is in is called the <em>level direction</em>.&nbsp; But if the two vectors are parallel, we get the highest value of the directional derivative.&nbsp; For a vector that is parallel in the same direction, the directional derivative will be a maximum, but if the vector is antiparallel (parallel but both pointing opposite ways), the directional derivative will be a minimum.</p>
<p align="left">Since the maximum value of the directional derivative is parallel to the gradient, we can calculate the unit vector of the gradient and use it as the unit vector <strong><em>u.&nbsp; </em></strong>In order to get the minimum, simply flip the direction of the vector by multiplying it by –1.</p>
<p align="center"><em><strong>u = </strong>∇ƒ(<strong>x</strong>)/|∇ƒ(<strong>x</strong>)|</em></p>
<p align="left">Although not necessarily required, substituting this value into the definition of the directional derivative, and doing some simplification with algebra, the maximum and minimum directional derivative is given by:</p>
<p align="center"><em>Max D<sub>u</sub>ƒ = |∇ƒ(<strong>x</strong>)|</em></p>
<p align="center"><em>Min D<sub>u</sub>ƒ = -|∇ƒ(<strong>x</strong>)|</em></p>
<p align="left">Using the initial guess, calculate the direction of to travel in at that point.</p>
<h2>Step 2</h2>
<p>Knowing the direction to travel choose a desired step size “h”.&nbsp; This means that if the equation will be traversed in a particular direction, we need to know exactly <em>how</em> far to go.&nbsp; Choosing smaller step sizes gives better computational accuracy but increases computation time.</p>
<p>To get to the maximum, use the direction for the maximum directional derivative.&nbsp; To get the minimum, use the direction for the smallest directional derivative.</p>
<p>Starting with a guess, calculate the function value at that point.&nbsp; Then take a step in the direction given by Step 1 using the step size.&nbsp; The variable “u” here is a component of the unit vector</p>
<p align="center"><em>x<sub>n+1</sub> = x<sub>n</sub> + u<sub>x</sub>h</em></p>
<p align="center">y<em><sub>n+1</sub> = y<sub>n</sub> + u<sub>y</sub>h</em></p>
<p align="left">At this new value, calculate the function value again.&nbsp; Keep repeating this until the maximum or minimum is reached.</p>
<h1>Limitation</h1>
<p>The approximation is generally only as good as the initial guess.&nbsp; Sometimes, a bad guess can lead to a solution that never converges.&nbsp; In that case, a different value must be used in order to find a converging solution.&nbsp; For example, if we have a fourth order polynomial function, a local extreme will exist.&nbsp; As x approaches –∞ or ∞, y will do the same.&nbsp; If I use the steepest descent and give a bad guess, my solution will go to ∞ instead of the local extreme.</p>
<h1>Sources</h1>
<ol>
<li>Calculus by Gilbert Strang</li>
<li>Applied Regression Analysis by Norman Draper and Harry Smith</li>
</ol>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.henrypoon.com/blog/2011/01/29/numerical-methods-for-non-linear-optimization/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">763</post-id>	</item>
	</channel>
</rss>
