Jump to content



Photo
- - - - -

Jacobian Matrix

casio fx-9860GII programming numerical methods derivatives

  • Please log in to reply
3 replies to this topic

#1 TOM_DLB_89

TOM_DLB_89

    Newbie

  • Members
  • Pip
  • 4 posts
  • Gender:Not Telling

  • Calculators:
    Casio fx-9860 GII
    Casio fx-991ES PLUS
    Casio fx-82ES PLUS

Posted 15 February 2018 - 10:36 AM

I've made a program that solves non-linear systems (2x2 and 3x3) of equations by newton method: r[i+1]=r[i]-J(r[i])^-1*F(r[i]).

The user is able to insert the functions (that I've set the program to store in FMEM - fn1, fn2...). During the iteration the values of each function will be in the vector F.

The big deal is defining the Jacobian Matrix. I wasn't able to find any way to make it unless the user insert by itself all the derivatives (4 or 9 functions) and the program allocate them, after calculating its values, in the matrix J.

Any suggestions or tips?

 



#2 pan.gejt

pan.gejt

    Casio Freak

  • Members
  • PipPipPipPip
  • 156 posts
  • Gender:Male
  • Location:CZ

  • Calculators:
    fx-880, fx-6300G, fx-9700GE, fx-9860G Slim, Classpad 330-A, TI-Nspire + keypad, TI-Nspire CAS, TI-Nspire CX CAS,TI-89 Titanium, HP-50g, SEC-101, fx-991ES PLUS, fx-991DE PLUS, fx-CP400, Canon X MARK I PRO, Citizen SRP-75,

Posted 15 February 2018 - 07:23 PM

Since there is no CAS inside 9860G II you have to calculate the derivatives numerically. Unfortunatelly, the numerical differentiation built in the calc is for single variable functions only, e.g. f(x)=x^3-ln(x)+ x.

I don't know how to calculate the derivative numerically for function with two or more variables, e.g. f(x)=x^2*y.

The syntax is d/dx(fx),a,tol) 



#3 piu58

piu58

    Casio Fan

  • Members
  • PipPip
  • 46 posts
  • Gender:Male

  • Calculators:
    Casio fx-9860G

Posted 15 February 2018 - 08:53 PM

It is not difficult to differentiate numerical. You need to define your function as a subroutine. To get the derivate at a point x, simply calc f(x) and f(x+d), where d is a small (but not too small) difference of the original x. The derivate ist the difference of the values divided by d.

 



#4 TOM_DLB_89

TOM_DLB_89

    Newbie

  • Members
  • Pip
  • 4 posts
  • Gender:Not Telling

  • Calculators:
    Casio fx-9860 GII
    Casio fx-991ES PLUS
    Casio fx-82ES PLUS

Posted 15 February 2018 - 08:59 PM

Yes, that is my problem. I need to input manually the partial derivatives formulas so the program will calculate the value.
Most of the times I get some equations like those

Screenshot_from_2018_02_15_17_54_24.png

 

and it is a hard work writing down the derivatives hahahaha.

 

Is there any way to solve non linear systems in casio fx-9860GII? I mean, systems like the one above. (I know that some systems are 'solvable' with the intersect function in graph mode).

 

*edit: K1, K2, na, nb, nc, nd, and ne are constants. The variables are E1 and E2.


Edited by TOM_DLB_89, 15 February 2018 - 09:01 PM.






Also tagged with one or more of these keywords: casio fx-9860GII, programming, numerical methods, derivatives

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users