Wikipedia:Reference desk/Archives/Mathematics/2012 January 29

Mathematics desk
< January 28 << Dec | January | Feb >> January 30 >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


January 29

edit

Diophantine equation.

edit

Figure out how many aliens of each color there are.

There are a total of 123 arms and 97 legs. The following are the different aliens and their corresponding limb amounts:

- YELLOW aliens have 5 arms, 4 legs - PURPLE aliens have 4 arms, 2 legs - BLUE aliens have 2 arms, 3 legs

How do you solve this methodically? ==>

5x + 4y + 2z = 123 4x + 2y + 3z = 97

Two equations, three unknowns. We know that x, y, z are all positive or zero. This seems like a Diophantine equation but I don't know how to solve it without guessing and checking. — Preceding unsigned comment added by 151.213.191.93 (talk) 03:09, 29 January 2012 (UTC)[reply]

You can always cheat and plug it into Wolfam Alpha, which gives the integer solutions at the bottom. You can quickly see that the only solutions that avoid negative values are n=0,1 and 2, so that gives you (x,y,z)=(1,21,17), (9,14,11) and (17,7,5). You can easily prove that those are solutions, your challenge is then to prove that there aren't any others - tricks involving modular arithmetic are usually the way to go with these questions, although I haven't tried with this one (although it is immediately clear that both x and z are odd). --Tango (talk) 03:50, 29 January 2012 (UTC)[reply]
Let's see. As Tango says, x and z have to be odd. Eliminating y gives us
3x + 4z = 71
Since 4z is 71 or less, z must be 17 or less. Workling modulo 3 tell us that z must be 2 mod 3. So z is an odd number, between 1 and 17, equal to 2 mod 3. This means that z can be 5, 11 or 17. The corresponding values of x are 17, 9 and 1, and y is 7, 14 or 21. Gandalf61 (talk) 15:16, 29 January 2012 (UTC)[reply]

Wolfram Alpha

edit

I'm trying to get the hang of the Wolfram Alpha app for the iPhone. Just to test it I inputted

solve diff(v,t) = 10 + 5v for t

It seems to understand the solve and for commands, but then gives a (correct) solution of

 

How do I get it to give a solution of the form t = …? Asking it to display the steps shows that it actually works this out, but then inverts it to give v = …. Also, how do I get it to impose initial conditions? I want the condition v(0) = 0. Fly by Night (talk) 15:31, 29 January 2012 (UTC)[reply]

For the initial condition, you can enter it in mathematica syntax as DSolve[{v'[t]==10+5v[t], v[0]==0},v[t],t]. To get it to solve for t, maybe rewrite it as DSolve[{1/t'[v]==10+5v, t[0]==0},t[v],v]. Sławomir Biały (talk) 15:39, 29 January 2012 (UTC)[reply]
Oddly, neither of these suggestions seems to work.  :-( Sławomir Biały (talk) 15:40, 29 January 2012 (UTC)[reply]
Ok, this works: Solve v'[t]=10+5v[t] with v[0]=0. Sławomir Biały (talk) 15:43, 29 January 2012 (UTC)[reply]
That does indeed work. Thanks a lot. Fly by Night (talk) 16:02, 29 January 2012 (UTC)[reply]

I'm just left with the problem of getting it to give the solution in the form t = …. Fly by Night (talk) 16:02, 29 January 2012 (UTC)[reply]

You can always use a second query: v=2 (-1+e^(5 t)) in terms of t seems to work. I don't know about the iphone app, but on the browser version, you can click on any expression in the results and it performs a new search with that term as the query, to save you typing it all out manually. Trying to get Wolfram Alpha to do what you want always seems like more of an art than a science, and it isn't exactly well documented - I suppose they need some people to buy Mathematica, though. 81.98.43.107 (talk) 19:51, 29 January 2012 (UTC)[reply]
For that, you can use Solve 1/t'[v]=10+5v with t[0]=0, although this trick may not generalize adequately. Sławomir Biały (talk) 21:17, 29 January 2012 (UTC)[reply]