Solve TI 89 Programming r(θ): Learn How to Input Expression & Variable

  • Thread starter Thread starter clandarkfire
  • Start date Start date
  • Tags Tags
    Programming Ti-89
Click For Summary
To fine-tune a function for the TI 89 Titanium, the goal is to create a function that accepts two inputs: an expression (like r(θ)) and a variable (θ), and evaluates the expression using the variable. The challenge lies in ensuring that the variable θ is treated as part of the expression rather than as a multiplication factor. The solution involves developing logic within the function to correctly interpret and evaluate the input expression with the provided variable. This requires the function to handle various arithmetic and trigonometric operations, allowing for flexibility in the types of expressions it can evaluate. The implementation will involve a significant amount of coding to achieve this functionality.
clandarkfire
Messages
31
Reaction score
0
Hi, I'm trying to fine-tune a function I wrote for the TI 89 Titanium. Basically, for part of my function, I need it to plug in θ (an inputted variable/argument) into an expression r(θ) - also a an inputted variable/argument - and yield a numerical result.

In other words, the input format is function(expression,θ). If I were to type in function(cos(θ), π/3), I want it to return 1/2.

The problem I'm encountering is that I can't make it treat a variable as an expression. I tried simply writing r(θ), hoping that it would yield the result that occurs when the number θ is put into the expression r, but then it interprets it as r*θ.

So, how can I make it plug θ into the expression?
Any help would be appreciated.
 
Last edited:
Computer science news on Phys.org
This will take a fair amount of code. In a nutshell, you need a function that takes two inputs: a function and an input to that function.

Your function will need to have logic to determine what the user's input function is, and then evaluate that function with the input value.

Your function should be able to accept input functions to do the arithmetic operations (add, subtract, multiply, divide), as well as the trig functions that you want it to work with, plus whatever functions you think you need.
 
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
10K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 5 ·
Replies
5
Views
14K