# Thread: Question regarding recursive functions

1. ## Question regarding recursive functions

If someone could please provide some guidance on this I would greatly appreciate it. I'm taking a C++ Data Structures and Algorithms class, we are currently covering recursion.

The first part of the assignment was to create two programs using recursive functions from exercises from the text-book, no problem there. The second part is involves these jpeg attachments; they are mathematical proofs.

Apparently, I'm supposed to prove the proof in Lesson5_15.jpeg with a program using recursion. Then, I'm supposed to implement Lesson5_19.jpeg using mutual recursion.

I have asked several friends and co-workers who are Computer Science grads about this; they are as puzzled as I am. In fact for Lesson5_15.jpeg, I'm told the only way to actually prove it is through writing it out on paper. This is an online course taken through a local college and I never actually meet with the actual class and instrcutor everything is done through the internet.

The other students in my class are just as confused and to make matters worse, when I asked the instructor to be more specific with he wants, he proceeded to explain the theory behind these proofs, but nothing in regards to what he wants with them or even remotely on how to achieve this. I have emailed him again asking for further clarification and haven't heard anything for a couple days; I doubt I'll hear anything until Monday.

Please note, I'm not asking anyone to complete my assignment for me, just some input on what the instructor might want and how I might achieve this.

Joe

2. Maybe using Newton's method (well, that's for finding the roots, but similar) to find an approximation?
All I can think of.

3. By prove I think it means proving that equations work. Write a program to calculate that series.

4. Originally Posted by knj316
Apparently, I'm supposed to prove the proof in Lesson5_15.jpeg with a program using recursion.
Are you sure you didn't misunderstand him, since this equation can be proved in 2 or 3 lines algebraically?

5. The Change of Base logarithm rule described in the 5_15 file can be proved recursively. Remember what a logarithm is. It is the inverse of the exponential function.

6. I'm confused. The equation is valid for any b>0, c>0, and x>0. But whatever variable the recursion is applied to takes discrete values. So is the recursive "proof" limited to just those values? And if it involves infinite series, is it careful about convergence? I'm a mathematician, not a computer scientist, and it just seems perverse that someone would try such a roundabout and error-prone "proof" when a completely general and rigorous proof is trivial.

7. Oh, no. Nothing like that. What I think the teacher wants is just an ad hoc proof. Certainly within a range of acceptable values. It's a programming class. The mathematical validity of this "proof" is not the objective. Instead, to apply a programming technique to a problem.

8. ## Thanks

Thanks for all of your replies, it definately gives me a starting point. Hopefully, I'll get further clarification sometime tommorow.

Unfortunately, my math is very rusty, thus making it more difficult.

Joe