Archive for the ‘general math’ Category

July 16th, 2008

Here’s one for catsynth – Inspired by xkcd, Andrew J. Bennieston took a tiger into Fourier Space and back using Mathematica. The result looks kinda cool.

July 13th, 2008

The 36th Carnival has been posted over at Rigorous Trivialities with a nice selection of articles for your enjoyment. I missed their call for submissions and so am feeling rather annoyed with myself at the moment!

The 37th carnival needs a host so why not head over to The Carnival of Mathematics to sign up for the job.? I would do it but I have already done it twice and it’s not fair for me to hog the show. As well as providing a service to the mathematical blogging community, it does wonders for your Technorati rating ;)

July 11th, 2008

I read a lot of maths related blogs, books and journals and often come across math problems that are either fun, interesting or both for one reason or another. Some I manage to solve on my own, others I solve using a CAS package like Mathematica or Matlab and then of course there are those that I solve by cheating and using google! There are also one or two that I am working on that I (or anyone else for that matter) might never solve – but I remain hopeful.

I find that solving maths problems is a lot of fun and much more satisfying than solving other types of puzzle such as crosswords or Sudoku. I am not saying there is anything wrong with these puzzles but, on the whole, I prefer to solve mathematical or computational problems.

Many other websites offer sets of problems for their readers to solve and I thought it was high time I got in on the act. Blinkdagger and Wild about Math, for example, are currently offering prizes for the solution of their problems. I will not be offering prizes for solving any of my problems but it is quite possible that you will get some warm-fuzzy feelings of pride for solving some of the tricky ones. You (and I) might even learn something too.

For the first few weeks I thought I would focus on problems from integral calculus because the solution of integrals requires techniques from many areas of mathematics such as algebra, complex analysis, numerical analysis, special functions and more. For most (but not all) of the integrals I will be featuring I know of at least one solution method already and will be posting that solution in a few weeks time. Part of the fun of integration though, is the fact that there are usually several possible solutions to any given problem and I hope to learn some new tricks and methods from you as I go along.

This week’s integral is a tricky one in my opinion (tricky if you choose not to google for it at least) but the answer can be expressed in terms of elementary functions.

\light \int \sqrt{\tan(x)} \,dx

Solutions can be posted in the comments section or sent to me by email (obtaining my email address is another puzzle for you to solve) and will be discussed in a future post. Again, there are no prizes on offer (I am far too poor for that) but hopefully that won’t put anyone off from having a go anyway.

Update (15th July 08): If you have posted a solution in the comments and it hasn’t appeared yet it is because I am holding back for a while to allow other people to have a go. I’ll keep all comments containing solutions on hold until the 25th July.

If you enjoyed this article, feel free to click here to subscribe to my RSS Feed

July 3rd, 2008

While reading The Times this morning, I came across an article that was discussing a numerical problem faced by the banks in Zimbabwe. Now, in case you haven’t heard, Zimbabwe has been suffering from hyperinflation for a while and even everyday items such as bread or beer can cost millions of Zimbabwean dollars.

With even low cost items costing millions of dollars you can imagine that high value transactions, such as those dealt with by banks, can have values of several trillions of dollars. According to this article in The Times, any transaction over 999 Trillion dollars will cause problems with the bank’s computers. The particular problem they have to deal with is called truncation but the article does not go into what truncation actually is.

So what I am wondering is – what is special about 999 trillion (I assume its 999 – the printed value is 9,99 which could mean 999 or 9.99 depending on where you come from)? I guess that it is a limit that was deliberately programmed in for some reason since 999 trillion isn’t anywhere near the usual suspects for numerical overflow.

Any thoughts?

June 17th, 2008

Some people collect stamps, some collect coins. I collect bugs in computer algebra systems and this is a particularly amusing one in my opinion. If you evaluate 2^31 using Mathcad’s symbolic engine in version 14 then you get a negative result! It comes up with the following

2^31-> -2147 483648

Note the negative sign! No computer algebra system is perfect but it is not often that you get a bug from such an elementary calculation – shame on you Mathcad! At least it gets the right result if you use its numerical engine

2^31 = 2.147 *10^9

Hopefully PTC will be releasing a bug fix soon.

June 17th, 2008

At the beginning of the year I wondered what interesting facts I could discover about the number 2008 and, with the help of readers of this blog, I came up with a lot more than I expected to. Now that we are over half way through the year I thought it was time to take another look at the integer 2008 with the following puzzle.

Choose any one of the digits from 0 to 9 and attempt to express the number 2008 using only that digit. You can repeat your digit as often as you like and use any of functions that are built into something like Mathematica, MATLAB or SAGE but, as you may expect, kudos will be awarded for using only simple functions and small numbers of repeats.

I spent a few minutes thinking about this problem and so far have only come up with

2008= (2*2^2)*(2^2^2)^2 – 2*2^(2*2) – 2*(2 + 2)

2008 = Ceiling[6*6*6*6 + 6! – Sqrt[66]]

2008 = Ceiling[Gamma[7.7] – (777) + 7 + 7 + 7/7]

but I am sure you can do better – those ceiling functions are pretty ugly for a start. Feel free to post your solutions in the comments section – I look forward to seeing them.

June 16th, 2008

A few years ago, while working through a degree in theoretical physics at Sheffield University, I took a course on special functions in physics that was given by the legendary lecturer Dr Stoddart (saviour of many a physics undergraduate, including me, during his many years there – please leave a comment if you studied at Sheffield and remember him).

This course introduced me to the fascinating world of the so called ‘higher transcendental functions’ of mathematical physics. I remember that we covered topics such as Bessel functions, Laguerre polynomials, Hermite Polynomials and the Gamma function among others but in a one semester course we only really scratched the surface of the subject.

Since then I have come across several other special functions during the course of my work such as the LambertW function, Mathieu functions, Chebyshev polynomials and more. I used to be a physicist and so, despite the fact that the theory behind these functions can often be fascinating, all I had time to consider back then was how to evaluate them.

In fact, as far as my professional life goes, the question of evaluation is still the only thing that I get asked about regarding special functions. Questions such as ‘How can I evaluate the LambertW function in MATLAB?’ (Answer – by using this user-defined function) or ‘Do you know of a free, open source, implementation of Bessel’s function?’ (Answer – the GNU Scientific Library).

The idea for this post came to me while reading an article written in 1994 (and subsequently updated in 2000) where the authors discussed the Numerical Evaluation of Special Functions. One of the features of this document was a list of various special functions combined with a list of software packages that could evaluate them. For example it lists Dawson’s integral and tells us that if you need to evaluate this then you can use various software packages such as the NAG libraries or Numerical Recipes.

I thought that this was a very useful document but a major problem with it is that it is rather out of date! Wouldn’t it be great if someone were to create an updated version that included all of the latest advances in software libraries and applications. I even idly thought of attempting to do this myself and publish the results here but it turns out that I have (thankfully) been beaten to it.

It’s not finished yet but the NIST Digital Library of Mathematical Functions looks like it is going to be exactly what I need. Apparently this project aims to be a sort of modern rewrite of Abramowitz and Stegun’s Handbook of Mathematical Functions, a book that almost every physicist I knew had a copy of. The preview looks very promising to say the least! For example, take the section on the Gamma Function. The library contains everything you might want to know about this function such as its definition, 2D and 3D plots of its graphs, its series expansion and, of course, a list of software packages and libraries that can be used to evaluate it. I note that, for the Gamma function, one can choose from MATLAB, Mathematica, MAPLE, NAG, Maxima, PARI-GP, the GSL, Numerical Recipes and several others – not exactly short of Gamma function implementations are we?

When it’s finished, the work will be published as a book called ‘Handbook of Mathematical Functions’ but will also be available freely online as a digital library – fabulous!

June 2nd, 2008

The 34th Carnival of Mathematics is up over at 360 and, as always, it includes a lot of great math related links. I didn’t submit anything to this edition because I haven’t written anything suitable recently but will try to submit something to the next one.

May 16th, 2008

Hello and welcome to the 33rd edition of the Carnival of Mathematics. This carnival very nearly didn’t happen since I didn’t realise that no one had offered to host it until a couple of days ago! I toyed with the idea of letting this edition of the carnival lapse and write something in a fortnights time but then that would break the carnivals unbroken run of 33 publications (well..apart from that one time which we don’t talk about) and I simply couldn’t have that. So, with only two days to go I bent the standard carnival rules a little and started leaning on people I know in order to get submissions. After that I started leaning on people I didn’t know and I am glad to say that everyone came through and I have a nice selection of articles for you all.

Before I get onto the articles themselves, tradition dictates that I attempt to fascinate you with some interesting facts concerning the number 33. Well how about this one:

It is known that for all numbers N below 1000 that do not have the form  \light\reverse 9n\pm 4 it is possible to express N as a sum of three cubes. In other words

\light  N=a^3+b^3+c^3

where a,b and c can be positive or negative. What does this have to do with the number 33? Well, 33 is the smallest such number for which a,b and c have not yet been found. If you fancy having a crack at solving this be aware that the solution for N=30 is

\light 30=(-283059965)^3 + (-2218888517)^3 + 2220422932^3

Anyway, enough with the trivia and on with the show!

As some of you know, I am a big fan of computer algebra systems (well most of them anyway) and so I thought I would start off with some submissions from three of the big names in the CAS world, Wolfram Research, The Mathworks and SAGE. I use the products of all three of these groups to one degree or another and so it is great to see submissions from them all. This is one of the areas where I bent the carnival rules slightly since I emailed the blog authors and said “Hi – please submit something to the carnival.” I thank them for humoring me and not consigning my email to the spam bin.

Loren from Loren on the Art of Matlab writes a regular blog on Matlab programming and her submission is a recent post entitled Acting on Specific Elements in a Matrix where she uses several methods to obtain the same result. This sort of article is very instructive when thinking about how to go about developing your code. Although she did not submit it, I thought that many carnival readers would also be interested in her post called Matlab Publishing for Teaching.

Next up from the Mathworks we have Doug whose submission is a coin tossing puzzle which he invites you to solve using Matlab. Some solutions can be found in the comments section so resist the urge to scroll down if you want to try and solve it yourself. Solving problems like this, using any system, can be a great way of learning how to use it – much more interesting than just reading through the manual; no matter how well written it is.

Moving over to the Wolfram Research Blog we have two posts in this edition of the carnival, the first of which is called Two Hundred Thousand New formulas on the Web which is a discussion of The Wolfram Functions Site. At the time of writing the site has over 307,00 formulas on it which is, quite frankly, astonishing! Pretty useful too!

Next up from Wolfram we have a blog post called Making Photo Mosaics. It never ceases to amaze me how much you can achieve with so little code – I will be having a play with this code using photos from my recent vacation :) Check out the video that Theodore has produced as part of this post as I think it’s fascinating.

Moving over to the world of open source we have a submission from William Stein – Can There be a Viable Free Open Source Alternative to Magma, Maple, Mathematica and Matlab? where he discusses the SAGE project. I have recently been looking at SAGE myself and have been very impressed with it.

This edition of the carnival isn’t just about computer algebra packages though – we also have lots of non-CAS submissions. The first of which is one from Maria over at the TCM Technology Blog where she writes about her talk, Exploring Online Calculus, at the Michigan MAA meeting. Gotta love those graphs :)

John of jd2718 asks Can we find the area of a quadrilateral from just it’s co-ordinates?, with some interesting answers in the comments section. I reckon a nice Wolfram Demonstration could be made from this idea.

Sam Shah thinks that algebraic manipulation is overrated – head over to his blog to see why. In another post, Sam also writes about some interesting calculus projects that he has assigned to his students. When I was at school I used to love open-ending projects as it used to give me a sense of ‘owning the material’. I distinctly remember doing a project on the Fibonacci sequence when I was 11 years old and spending ages on it. To this day I still have a fascination for the topic and probably always will. I wonder how often such projects can be done by school children in todays test-centric environment?

Moving on, we have Math for the Very Patient from Vlorbik on Math Ed. Vlorbik has already demonstrated his patience in the past since my blog looks horrible on his browser and yet he still reads what I have to say – thanks Vlorbik! I seem to have a problem with IE 6 that I have no idea how to fix. Just look at this blog in IE 6 compared to firefox to see what we mean. One hexadecimal pound (thats two pounds and fifty six pence) to the first person who can diagnose and fix the problem for me.

Over at blinkdagger (among other things, a great source of Matlab tutorials) they have a competition where you can win prizes from the people at the art of problem solving. There is still time to enter so take a look at BlinkDagger burgers and have a go.

If you like the level of your mathematics to be a bit higher and median graphs are your thing then you will be interested in David Eppstein’s submission Median graphs and binary majorization over at OxDE.

Denise of Let’s Play Math sent me the details of her latest post, The Function Machine Game. This is another one I remember doing when I was at school. As she suggests it’s probably best to limit the functions one can choose from – “Waddya mean you couldn’t get it – BesselJ(x) is simple!” I feel yet another Wolfram Demonstration coming on :)

Next we have a post from a blog that writes posts on the all time classic combination of subjects, cats and maths – Catsynth.com. The post is about how to calculate \light \reverse\pi(x) (that is the number of prime numbers below an integer x) without having to calculate all of the primes up to x. I wonder how the various CAS systems calculate this function? Anyone care to enlighten me?

Finally, in another bending of the rules, I’d like to present Five Open Problems Regarding Convex Polytopes from Gil Kalai’s blog, Combinatorics and more. He didn’t submit this post himself but it comes highly recommended and so I hope he will not mind having it included here.

And…that’s it for this 33rd edition of the carnival. Thank you to everyone who submitted something – without you the carnival would be..well..just me posting a load of links! Finally, would someone please volunteer to host the 34th edition of the carnival? I think it really is a lovely tradition that has been kept going by maths bloggers for almost 18 months now, which is like an eternity in internet years and it would be a shame to see it go. I think that it’s a great way of finding new math blogs and also of generating a sense of community in the maths blogsphere.

Enjoy!

Update: As it says in the comments, the next Carnival will be hosted over at 360 on May 30th so please head over there and submit a post. Making a submission is as easy as saying “Hi, what about this one…< insert link here>” 9 times out of 10 your post will be accepted so its an easy way to promote your blog.

May 14th, 2008

Until recently, I didn’t realise that no one had volunteered to host the next Carnival of Mathematics and so I had a quick chat with Alon and we agreed to have it here. I know that it is short notice but I would really appreciate it if you could send in any submissions as soon as possible please.

By far the easiest method of submission would be to write a comment giving me all of the details of your post – I will then withhold that comment from being published on this page, email you to confirm receipt and start putting together the carnival for publication this Friday.

Your Carnival needs you!

Update: You can also submit your post via the carnival submission form.