H can I make a function on Ti-basic?

  • Thread starter Thread starter Link-
  • Start date Start date
  • Tags Tags
    Function
AI Thread Summary
The discussion centers on programming mathematical functions in TI-Basic for TI calculators, specifically for implementing the bisection method in a Numerical Analysis class. Users seek guidance on defining functions like f(x) = x^2 + 3x and evaluating them at specific points, such as f(2) and f(3). It is noted that the TI-89 allows for function definitions, which can be created in the program menu, enabling users to call them like traditional functions. However, some users encounter issues with variable definitions and error messages when attempting to run their programs. Resources such as links to programming guides and examples are shared to assist in the process. One user provides a sample program that successfully evaluates a function, although they express dissatisfaction with its professionalism. The conversation highlights the challenges and solutions related to programming on TI calculators, emphasizing the need for clarity in function definitions and program structure.
Link-
Messages
99
Reaction score
0
Hi,

Do anyone know how can I make a function on Ti-basic?

What I mean by function is mathematical function IE. f(x)=x^2+3x and then take the value of f(2) and f(3) and store them on a variable.

I'm trying to program the http://en.wikipedia.org/wiki/Bisection_method" on the calculator for my Numerical Analysis class and I need to take f(a) and f(Pn).

f(p)=0

Thanks

Link
 
Last edited by a moderator:
Technology news on Phys.org
Apparently nobody programs on a TI calculators.

Kind of obvious why.

:redface:
 
Last edited:
:evalF(F,x,A)->FA
:evalF(F,x,C)->FC

This evalf() command is not on the ti-89, at least doesn't have the same name and it just what I need.

Thanks Ranger
 
You say that it is a TI-89?

I am quite sure that the TI-89 allows you to actually define functions. I do not remember exactly where in the interface you do this, and I cannot find my TI-89 right now. However as I remember it, in the menu where you can create programs, you can also create "functions". Functions are like programs, but they return a value. This means (1) you can call them like functions from the interpreter prompt, which is what you seem to want to do and (2) you can call them from other programs the way functions in a normal programming language would work. Look in the menus, do you see what I am referring to?
 
Yes, Coin there is a way to define a function actually is Define like this

:Define f(x)=Funct
: /*Function of x*/
:
EndFunct

But for some reason when i try to run the program, I get an error message telling me that I didn't define variable. :confused:

I had read the manual a couple of times, is not real good source for programming and commands.
 
ranger said:

Thanks Ranger, but the problem is that I'm suppose to make the program. I already manage to evaluate the desire function but is was not a real profesional way. It is kind of lame.

I made this:

Code:
ClrIO
Dialog
Request "Function: f(x)",f
Request "Initial point",a
Request "Final Point",b
Request "Tolerance",tol
EndDlog
If Ok=0:Stop
expr(a)->a:expr(f)->f:expr(b)->b:expr(tol)->tol
[B]a->x
f->fa[/B]
While abs(a-b)/(abs(a+b)/2)>tol
     a+(b-a)*0.5->p
    [B] p-x
     f->fp[/B]
   If fp=0 Then
          Disp "p=",p
          Stop
   EndIf
   If fa*fp>0 Then
         p->a
         fp->a
   Else
        p->b
   EndIf
EndWhile
Disp "f(p)=0, p=",p
EndPrgm

The bold is how do manage to evaluate my function
 
Back
Top