<?xml version="1.0" encoding="UTF-8" ?>
  <resource>
  <id>6322</id>
  <path>/www/nrich/html/content/id/6322/</path>
  <resourceTypeID>1</resourceTypeID>
  <last_published>2011-06-09T09:31:54</last_published>
  <indexXML>&lt;mdoxml xmlns:ns0=&quot;http://nrich.maths.org/mdo&quot; version=&quot;1.0&quot;&gt;
  &lt;br /&gt;
  &lt;ul id=&quot;buttonBar&quot;&gt;
    &lt;li&gt;
      &lt;a href=&quot;http://nrich.maths.org/6506&amp;amp;part=&quot;&gt;Warm-up problem&lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;a href=&quot;http://nrich.maths.org/6583&amp;amp;part=&quot;&gt;Try this next&lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;a href=&quot;https://nrich.maths.org/discus/messages/27/27.html&quot;&gt;Ask NRICH&lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;a href=&quot;http://en.wikipedia.org/wiki/Curve_fitting&quot;&gt;Read all about it&lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;a href=&quot;http://nrich.maths.org/6359&amp;amp;part=solution&quot;&gt;Last week's solution&amp;#160;&lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
  &lt;div&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;p&gt;Two functions $f(x)$ and $g(x)$ were plotted on the same axes, where&lt;br /&gt;
$$&lt;br /&gt;
f(x) =\left(\frac{a}{x}\right)^x\quad \quad g(x) = b\exp\left(-\frac{(x-c)^2}{d}\right)&lt;br /&gt;
$$&lt;br /&gt;
I chose the coefficients $a, b, c$ and $d$ so as to make the function $g(x)$ match $f(x)$ 'as closely as possible' for points past the maximum of $f(x)$. My resulting charts were as follows.&lt;br /&gt;
      &lt;br /&gt;
      &lt;mdo:image alt=&quot;plots&quot; src=&quot;charts.JPG&quot; /&gt;
      &lt;br /&gt;
Is it possible to approximately work out the values I chose? Can you choose values to obtain a closer match between the two?&lt;/p&gt;
  &lt;/div&gt;
  &lt;div class=&quot;framework&quot;&gt;
    &lt;span style=&quot;font-style: italic;&quot;&gt;Did you know ... ?&lt;/span&gt;
    &lt;br /&gt;
    &lt;br /&gt;
Curve fitting/matching is big business in financial mathematics, where the goal is to be able to quote prices for non-liquidly traded products. To do this you need volatility and interest rate&amp;#160;curves which are found by interpolating in some clever way between data points obtained from the price of standard (vanilla) traded products. For tractible mathematical analysis it often helps to try
to base these curves in some sense on standard mathematical functions.&lt;/div&gt;
  &lt;br /&gt;
&lt;/mdoxml&gt;
</indexXML>
  <solutionXML>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;mdoxml version=&quot;1.0&quot;&gt;
&lt;p&gt;&lt;span class=&quot;editorial&quot;&gt;I was delighted to receive this &lt;a href=&quot;/content/id/6322/o9JnBn-Niharika-2-July-2011_0001.pdf&quot;&gt;solution from Niharika Paul&lt;/a&gt;, one of our younger solvers.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;editorial&quot;&gt;The actual functions plotted were as follows:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Two functions $f(x)$ and $g(x)$ were plotted on the same axes, where&lt;br&gt;&lt;/br&gt;
$$&lt;br&gt;&lt;/br&gt;
f(x) =\left(\frac{20}{x}\right)^x\quad \quad g(x) = 1568\exp\left(-\frac{(x-7.3576)^2}{17.6232}\right)&lt;br&gt;&lt;/br&gt;
$$&lt;br&gt;&lt;/br&gt;
The coefficients in $g(x)$ were chosen so as to make the function $g(x)$ match $f(x)$ as closely as possible for points past the maximum of $f(x)$&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
Their charts at various points are&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;mdo:image alt=&quot;&quot; height=&quot;528&quot; src=&quot;charts.JPG&quot; width=&quot;570&quot;&gt;&lt;/mdo:image&gt;&lt;/p&gt;

&lt;/mdoxml&gt;</solutionXML>
  <noteXML/>
  <clueXML/>
  <canonXML>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;mdoxml version=&quot;1.0&quot;&gt;&lt;br&gt;&lt;/br&gt;
Two functions $f(x)$ and $g(x)$ were plotted on the same axes,
where&lt;br&gt;&lt;/br&gt;
$$&lt;br&gt;&lt;/br&gt;
f(x) =\left(\frac{20}{x}\right)^x\quad \quad g(x) =
1568\exp\left(-\frac{(x-7.3576)^2}{17.6232}\right)&lt;br&gt;&lt;/br&gt;
$$&lt;br&gt;&lt;/br&gt;
The coefficients in $g(x)$ were chosen so as to make the function
$g(x)$ match $f(x)$ as closely as possible for points past the
maximum of $f(x)$&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
Their charts at various points are&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;mdo:image height=&quot;528&quot; width=&quot;570&quot; alt=&quot;&quot; src=&quot;charts.JPG&quot;&gt;&lt;/mdo:image&gt;&lt;br&gt;&lt;/br&gt;&lt;/mdoxml&gt;</canonXML>
  <end_user_role>2</end_user_role>
  <difficulty>5</difficulty>
  <keystage1>0</keystage1>
  <keystage2>0</keystage2>
  <keystage3>0</keystage3>
  <keystage4>0</keystage4>
  <keystage4plus>1</keystage4plus>
  <title>Weekly Challenge 43: A close match</title>
  <description>
Can you massage the parameters of these curves to make them match as closely as possible?

</description>
  <spec_group>Sequences, Functions and Graphs
    <specifier>Maximise/minimise/optimise</specifier>
  </spec_group>
  <spec_group>Sequences, Functions and Graphs
    <specifier>Graph sketching</specifier>
  </spec_group>
  <spec_group>Information and Communications Technology
    <specifier>Graph plotters</specifier>
  </spec_group>
  <spec_group>Collections
    <specifier>Weekly Challenge</specifier>
  </spec_group>
</resource>