Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'entering and using an equation in a module' topicStudent Support Forum > General > Archives > "entering and using an equation in a module"

Next Comment >Help | Reply To Topic
Author Comment/Response
John Hinchie
01/27/05 2:20pm

Hi,

I am attempting to create a module that can solve nonlinear equations using interval halving (bisection). I will need to enter a formula into the module and then find f(x) for different values of x.

A simpler question that will solve my problem would be how to a make a module called f that can have these outputs with these inputs?

In[22] := f[2, x^2+2]
Out[22] := 6

In[23]:= f[{0,1,2}, 3x^3+3]
Out[23] :={3,6,27}

In words, I want to input an equation into a module and calculate with local variables in that equation.

How can I do this?

Thanks,


URL: ,

Subject (listing for 'entering and using an equation in a module')
Author Date Posted
entering and using an equation in a module John Hinchie 01/27/05 2:20pm
Re: entering and using an equation in a module yehuda ben-s... 01/29/05 5:41pm
Next Comment >Help | Reply To Topic