Loading web-font TeX/Math/Italic

Tuesday, 2 March 2021

Time for some Maths

While tidying up my old University Maths notes the other day I came across this problem. (I didn't get it right first time round!)

It's quite interesting and I thought I'd also use the opportunity to setup nice looking maths on the blog. So, the question:

Find the first two terms of the series for tanx in powers of x.

Now, 

tanx=\frac{sinx}{cosx}


and the power series expansions of sinx and cosx begin as:

sinx=x-\frac{x^3}{3!}+\frac{x^5}{5!}+...

cosx=1-\frac{x^2}{2!}+\frac{x^4}{4!}+...


Put this together:

tanx=\frac{x-\frac{x^3}{6}+...}{1-\frac{x^2}{2}+...}


Multiply by \frac{1+\frac{x^2}{2}}{1+\frac{x^2}{2}} (This is just multiplying by 1 and chosen so we can deal with the x^2 term in the denominator), so:

tanx=\frac{(1+\frac{x^2}{2})(x-\frac{x^3}{6}+...)}{(1+\frac{x^2}{2})(1-\frac{x^2}{2}+...)}

If we now just multiply out the first term we get

tanx=\frac{x+\frac{x^3}{2}-\frac{x^3}{6}+...}{1+\frac{x^2}{2}-\frac{x^2}{2}+...}

tanx=\frac{x+\frac{x^3}{3}+...}{1+...}

The other terms in x^4 and x^5 can be ignored, giving:

tanx=x+\frac{x^3}{3}+...


To display the formulae I've added MathJax to the blog. 

Go to Theme then from the Customise dropdown select Edit HTML. Add the following just below the <head> element:


<script src='http://cdn.mathjax.org/mathjax/latest/MathJax.js' type='text/javascript'>
MathJax.Hub.Config({
extensions: [&quot;tex2jax.js&quot;,&quot;TeX/AMSmath.js&quot;,&quot;TeX/AMSsymbols.js&quot;],
jax: [&quot;input/TeX&quot;, &quot;output/HTML-CSS&quot;],
tex2jax: {
inlineMath: [ [&#39;&#39;,&#39;&#39;], [&quot;\\(&quot;,&quot;\\)&quot;] ],
displayMath: [ [&#39;&#39;,&#39;
&#39;], [&quot;\\[&quot;,&quot;\\]&quot;] ],
},
&quot;HTML-CSS&quot;: { availableFonts: [&quot;TeX&quot;] }
});
</script>
view raw MathJax.js hosted with ❤ by GitHub


Finally, here's a useful link: MathJax basic tutorial and quick reference - Mathematics Meta Stack Exchange

 

1 comment:

  1. Oops, missed the first x when multiplying out the numerator in the first version of this post. Now updated!

    ReplyDelete