Solving a system of recursive functions

In summary, the conversation discusses a system of recursive functions involving f and g, where f(0) = 0 and g(0) > 0. The system is related to trig functions and is part of a math puzzle involving the collision of two balls on a pool table. The governing formulas for the puzzle are provided, and the problem is considered to be discrete-time.
  • #1
Chef Hoovisan
2
0
I've run across a system of recursive functions (call them f and g). The system looks like this:

f(x) = a f(x-1) + b g(x-1)
g(x) = a g(x-1) + c f(x-1)

I also know that f(0) = 0 and g(0)>0. Finally, I know for other reasons that are too complicated to go into here that the system is somehow related to the trig functions. This is well outside my area of expertise, so I'm hopeful one of you can point me in the right direction so that I can perhaps simplify the system. Thanks in advance.
 
Mathematics news on Phys.org
  • #2
Chef Hoovisan said:
I've run across a system of recursive functions (call them f and g). The system looks like this:

f(x) = a f(x-1) + b g(x-1)
g(x) = a g(x-1) + c f(x-1)

I also know that f(0) = 0 and g(0)>0. Finally, I know for other reasons that are too complicated to go into here that the system is somehow related to the trig functions. This is well outside my area of expertise, so I'm hopeful one of you can point me in the right direction so that I can perhaps simplify the system. Thanks in advance.

If it's possible can you say what are you trying to do here. Why is f(0) = 0 and g(0)>0? Is it some kind of conditions?
In what way are you trying to simplify the system.Please do explain
 
  • #3
I'll give you the context, but as I said it's a bit involved. It's a math puzzle to which I know the answer, but do not understand the intuition behind the answer. Here's the puzzle:

A “small” ball with unit mass is resting on a pool table. A “big” ball with mass 16x100n (n a non-negative integer) is also resting on the pool table. That is, the higher mass ball will have a mass of m∈{ 16, 1600, 160000, …}. A man then strikes the big ball causing it to move toward and then strike the small ball. This collision sends the small off toward the bumper. The direction of all movement is perpendicular to the bumper, so the small ball rebounds from the bumper and returns until it strikes the big ball. Another collision results, sending the small ball back toward the bumper and repeating the process (albeit with different velocities for the balls). The pool table is frictionless and its bumpers are perfectly elastic, so there is no loss of velocity as the balls move along the table or when they rebound after hitting a bumper. Eventually, the collisions slow the big ball enough so that it reverses course and moves away from the small ball rather than toward it, thus ending the process. How many collisions, as a function of n, will there be between the big and small balls? Note that because of the frictionless system, you can ignore any spin in the balls and focus only on conservation of momentum and conservation of energy.

The governing formulas for this situation are shown here: http://en.wikipedia.org/wiki/Elastic_collision . Let m1 and m2 be the masses of the two balls and let v1(n) and v2(n) be the velocities of the two balls. We then have

v1(x) = (v1(x-1)*(m1-m2) + 2m2v2(x-1)) / (m1+m2)

and

v2(x) = (v2(x-1)*(m2-m1) + 2m1v1(x-1)) / (m2+m1)

Using a little algebra from there, you get the form I mentioned in the original post. Note that you do need to be careful to reverse the sign of the small ball's velocity to account for its rebound off the wall.

This is one of the most interesting math puzzles I've ever run across (and I've seen many, many of them), so I won't spoil the solution in case you want to work on it. I've seen a few somewhat unsatisfying "solutions," which is what has led me to ponder the recursive nature of the problem and how that might be used to produce a solution that provides good intuition.
 
  • #4
Would you say the problem is discrete-time? If so, a Z-transform might help.
 

1. What is a recursive function?

A recursive function is a function that calls itself within its own definition. This allows for the function to solve a problem by breaking it down into smaller, simpler versions of itself until it reaches a base case.

2. How do you solve a system of recursive functions?

To solve a system of recursive functions, you must first identify the base cases for each function. Then, you can use those base cases to build up the solution for the larger problem. This process may involve multiple recursive calls and keeping track of the intermediate results.

3. What is the significance of a base case in a recursive function?

A base case in a recursive function is the stopping condition that prevents the function from calling itself infinitely. It is necessary for a recursive function to have a base case in order for it to eventually reach a solution and terminate.

4. Can a recursive function have more than one base case?

Yes, a recursive function can have more than one base case. This can be useful for handling different scenarios or edge cases in a problem. However, it is important to ensure that the base cases do not overlap, or else the function may enter an infinite loop.

5. What are the advantages and disadvantages of using recursive functions?

The advantages of using recursive functions include their simplicity and elegance in solving certain types of problems, such as those involving repetitive tasks or data structures. However, recursive functions can also be memory-intensive and may not be the most efficient solution for larger or more complex problems.

Similar threads

  • General Math
Replies
2
Views
726
  • General Math
Replies
3
Views
815
Replies
7
Views
1K
  • General Math
Replies
4
Views
770
Replies
17
Views
2K
  • General Math
Replies
2
Views
883
Replies
3
Views
715
Replies
4
Views
902
Replies
2
Views
1K
Back
Top