Die folgenden Beispiele zeigen einige der Möglichkeiten von Yacas. Die Liste ist bei weitem nicht vollständig. Yacas enthält einige hundert Funktionen, von denen hier nur einige wenige gezeigt werden.
Weitere Beispielrechnungen inkl. der Lösungen finden sich hier:
100!; |
ToBase(16,255); |
Expand((1+x)^5); |
Apply("+",{2,3}); |
Apply({{x,y},x+y},{2,3}); |
D(x)D(x) Sin(x); |
Solve(a+x*y==z,x); |
Taylor(x,0,5) Sin(x); |
Limit(x,0) Sin(x)/x; |
Newton(Sin(x),x,3,0.0001); |
DiagonalMatrix({a,b,c}); |
Integrate(x,a,b) x*Sin(x); |
Factors(x^2-1); |
Apart(1/(x^2-1),x); |
1/(2*Pi)*Sin(q*phi)/Sin(2*q*phi)+ 1/Pi*Sum(n, 0, Infinity, Cos(n*chi) * Sin(Sqrt(q^2-n^2)*phi) / Sin(Sqrt(q^2-n^2)*phi) )
Für die Lösung wird eine Datei mit folgendem Yacas-Code erstellt:
/* Auxiliary function */ g1(n, q, phi, chi) := [ Local(s); s := q^2-n^2; N(Cos(n*chi) * If(s=0, 1/2, /* Special case of s=0: avoid division by 0 */ Sin(Sqrt(s)*phi)/Sin(2*Sqrt(s)*phi) /* now s != 0 */ /* note that Sqrt(s) may be imaginary here */ ) ); ]; /* Main function */ g(q, phi, chi) := [ Local(M, n); M := 16; /* Exp(-M) will be the precision */ /* Use N() to always force evaluation */ N(1/2*Sin(q*phi)/Sin(2*q*phi)) + /* Estimate the necessary number of terms in the series */ Sum(n, 1, N(1+Sqrt(q^2+M^2/phi^2)), g1(n, q, phi, chi)) ; ]; /* Parameters */ q:=3.5; phi:=2; /* Make a function for plotting: it must have only one argument */ f(x) := g(q, phi, x); /* Plot from 0 to 2*Pi with 80 points */ GnuPlot(0, N(2*Pi), 80, f(x)); |
Load("fun1"); |