Getting started with KAlgebra/da: Difference between revisions
(Importing a new version from external source) |
(Importing a new version from external source) |
||
Line 28: | Line 28: | ||
{{Input|1=f(3)}} | {{Input|1=f(3)}} | ||
hvilket skulle give resultatet {{Output|1=9.}} | |||
You can define a function with as many variables as you want: | You can define a function with as many variables as you want: |
Revision as of 12:15, 10 October 2010
Hjem » Programmer » Uddannelse » KAlgebra Hjem » Programmer » Uddannelse » KAlgebra » Kom i gang
Kalgebra er et regneprogram med symbolske og analytiske faciliteter, som både lader dig tegne grafer og 3D-plots og arbejde med matematiske udtryk.
Fanebladet Konsol
Lige når du starter KAlgebra, så ser du et tomt vindue; det er hovedsaligt her du arbejder med beregninger.
Lad os komme i gang med et lille eksempel på, hvordan KAlgebra virker. Skriv
2+2
og tast så Enter. Kalgebra viser dig så resultatet. Det var nemt nok.
Men KAlgebra kan meget mere end det. Den startede som et enkelt regneprogram, mer er nu næsten et CAS-program.
Du kan definere variable således:
k:=3
og bruge dem normalt:
k*4
Det vil give resultatet
12
Du kan også definere funktioner:
f:=x->x^2
og bruge dem:
f(3)
hvilket skulle give resultatet
9.
You can define a function with as many variables as you want:
g:=(x,y)->x*y
The possibilities of defining functions are endless if you combine this with the piecewise function. Let's define the factor function:
fact:=n->piecewise { n=0 ? 1, n=1 ? 1, ? n*fact(n-1) }
Yes! KAlgebra supports recursive functions. Give some values to n, to test it.
fact(5) fact(3)
KAlgebra has recently started support for symbolic operations, to check it out, just type:
x+x+x+x
or
x*x
It doesn't work on some complex structures, though. Only basic support so far.
Moreover, KAlgebra has support for differentiation. An example of the syntax:
diff(x^2:x)
If you have used KAlgebra, you will have noticed the syntax completion support, which is very helpful.
Another resource that can be useful to learn more about KAlgebra comes with KAlgebra: The
tabIt contains examples of every function supported by KAlgebra. Maybe this is the best way to learn how to do things with KAlgebra.