Sei sulla pagina 1di 10

(%i25) kill(all)$

[] solve (e, x)

. . . . . . . . . . . . . . . . . . .

e, x

[] solve([e_1, ..., e_m], [x_1, ..., x_n]) . . . . . . . . . e1 , , em ,


x1 , , xn e , e e = 0. x
f (t), e , x E

(%i1)

kill(all)$
solve(asin (cos (3*x))*(f(x) - 1), x);

solve : usingarc trigf unctionstogetasolution.Somesolutionswillbelost.

(%o1) [x = , f (x) = 1]
6
(%i2)

solve (5^f(x) = 125, f(x));

(%o2)

[ f (x) =

(%i3)

[4*x^2 - y^2 = 12, x*y - x = 2];


solve (%, [x, y]);

(%o3)

[4 x2 y 2 = 12, x y x = 2]

log (125)
]
log (5)

(%o4) [[x = 2, y = 2], [x = 0.5202594388652 i0.13312403573587, y = 0.076783785237878


3.608003221870287 i], [x = 0.5202594388652 i0.13312403573587, y = 3.608003221870287 i+
0.076783785237878], [x = 1.733751846381093, y = 0.15356757100197]]
(%i5)

solve (1 + a*x + x^3, x);

(
)
) (
) 13
) (
(
3i
1

a
3
2
2
3i 1
4 a + 27 1
3i 1
4 a3 + 27

,
x
=

3
3
)1
(
2
2
2
2
2
2 32
2 32
1 3
4 a3 +27
2
3
3

(
(%o5)

[x =

232

Maxima

wxMaxima

3i
2

1
2

a
) 13 , x =

(
4 a3 + 27
23

4 a3 +27

232

1
2

3
2

) 13

a
(
)1 ]
4 a3 +27
1 3
3
2
3
232

[] algsys ([e_1, ..., e_m], [x_1, ..., x_n]) . . .

e1 , , em , x1 , , xn

(%i6)

e1: 2*x*(1 - a1) - 2*(x - 1)*a2$


e2: a2 - a1$
e3: a1*(-y - x^2 + 1)$
e4: a2*(y - (x - 1)^2)$
algsys ([e1, e2, e3, e4], [ x,y, a1, a2]);

(%o10)

[[x = 0, y = %r8, a1 = 0, a2 = 0], [x = 1, y = 0, a1 = 1, a2 = 1]]

[] funcsolve (eqn, g(t)) . . . . . . . . . . . . . . . eqn g(t)


(%i11) eqn: (n + 1)*f(n) - (n + 3)*f(n + 1)/(n + 1) =
(n - 1)/(n + 2);
(%o11)

(n + 1) f (n)

(n + 3) f (n + 1)
n1
=
n+1
n+2

(%i12) funcsolve (eqn, f(n));


solve : dependentequationseliminated : (43)
n
(%o12) f (n) =
(n + 1) (n + 2)
[] solve_rec (eqn, s(n), [init])

eqn s(n), ini

(%i13) load("solve_rec")$
solve_rec((n+4)*s[n+2] + s[n+1] - (n+1)*s[n], s[n]);
(%o14)

sn =

%k 2
%k 1 (2 n + 3) (1)n

(n + 1) (n + 2)
(n + 1) (n + 2)

Maxima

wxMaxima


[] globalsolve[false]

. . . . .

true , (global)

(%i15) globalsolve: true$


solve ([x + 3*y = 2, 2*x - y = 5], [x, y]);
[x,y];
(%o16)
(%o17)

17
1
, y : ]]
7
7
17 1
[ , ]
7
7
[[x :

(%i18) globalsolve: false$


kill (x, y)$
solve ([x + 3*y = 2, 2*x - y = 5], [x, y]);
[x,y];
(%o20)

[[x =

(%o21)

[x, y]

17
1
, y = ]]
7
7

[] breakup[true] true ,
, programmode false
[] programmode[true] . .

true , %t .

(%i22) programmode: false$


breakup: true$
solve (x^3 + x^2 - 1);

(%t24)

(%t25)

(%t26)
(%t27)
(%o27)

(
23

) 13
25
solve : solution :
3 +
54
2 32
)
(

3i
12
1
3i 1
2

%t24 +

x=
2
2
9 %t24
3
)
(

23 i 12
1
3i 1

%t24 +

x=
2
2
9 %t24
3
1
1

9 %t24 3
[%t25, %t26, %t27]

x = %t24 +

Maxima

wxMaxima

(%i28) programmode: true$


breakup: false$
solve (x^3 + x^2 - 1);

(%o30)

[x =
9

23 i
(
23
3

232

4
4.1

3i
2
(
23
3

232

1
2

1
) 13 3 , x =
25

(
) 13 (
)
(
) 13 (
)
23 25
3i 1
23 25
3i 1
1

,x =

+
3 +
3 +
)1 +
54
2
2
3
54
2
2
2 32
2 32
25 3
1
2

54

(
23

25
3 +
54
2 32

54

) 13

1
+ (
9 233 +
232

1
) 13 3 ]
25
54

[] allroots(e) . . . . . . . . . . . . .

e .

(%i31) eqn: (1 + 2*x)^3 = 13.5*(1 + x^5);


soln: allroots (eqn);
(
)
(%o31) (2 x + 1)3 = 13.5 x5 + 1
(%o32) [x = 0.82967499021294, x = 1.015755543828121, x = 0.96596251521964 i
0.40695972319241, x = 0.96596251521964 i 0.40695972319241, x = 1.0]
[] bfallroots(e) .
bigfloats. bf

e , allroots(e)

(%i33) soln: bfallroots (eqn);


(%o33) [x = 8.296749902129362b1, x = 1.015755543828121b0, x = 9.65962515219637b
1 i4.069597231924075b1, x = 9.65962515219637b1 i4.069597231924075b1, x =
1.0b0]

4.2

[] newton(e, x, x_0, eps) x = x0 , |e| < eps , e

Maxima

wxMaxima

(%i34) load(newton1)$
newton (cos (u), u, 1, 1/100);
ev(cos(u), u = %);
assume(a > 0)$
newton(x^2 - a^2, x, a/2, a^2/100);
ev(x^2 - a^2, x = %);
(%o35)

1.570675277161251

(%o36)

1.2104963335033528 104

(%o38)

1.00030487804878 a

(%o39)

6.0984904818539576 104 a2

[]

mnewton (e, x, x_0)

, e, x, x0 list

(%i40) load("mnewton")$
mnewton([x1+3*log(x1)-x2^2, 2*x1^2-x1*x2-5*x1+1],
[x1, x2], [5, 5]);
mnewton([2*a^a-5],[a],[1]);
mnewton([2*3^u-v/u-5, u+2^v-4], [u, v], [2, 2]);
(%o41)

[[x1 = 3.756834008012769, x2 = 2.779849592817898]]

(%o42)

[[a = 1.70927556786144]]

(%o43)

[[u = 1.066618389595407, v = 1.552564766841786]]

(%i44) kill(all);
(%o0)

done

[] ode2 (ode, y, x) . . x , y ode .


(%i1)

(%o1)

kill(all)$
OE:x^2*'diff(y,x) + 3*y*x = sin(x)/x;
ode2(OE,y,x);
(
)
d
sin (x)
2
x
y + 3xy =
dx
x

Maxima

wxMaxima

[]

%c cos (x)
x3
ic1 (s, x_0, y_0) . . . . . . .

[]

ic2 (s, x_0, y_0,dy_0) . s y(x0 ) = y0 ,y (x0 ) = y0

(%i3)

ic1(%,x=%pi,y=0);

(%o3)

y=

(%i4)

OE2:'diff(y,x,2) + y*'diff(y,x)^3 = 0;
ode2(OE2,y,x);

(%o2)

(%o4)

y=

s x0 y0 .

cos (x) + 1
x3

d2
y+y
d x2

d
y
dx

)3
=0

y 3 + 6 %k1 y
= x + %k2
6
[] bc2 (s, x_1, y_1,x_2, y_2) . .
y(x2 ) = y2 .
(%o5)

(%i6)

bc2(%,x=0,y=1,x=1,y=3);

(%o6)

y 3 10 y
3
=x
6
2

s y(x1 ) = y1 ,

[] lagrange (points) Lagrange , points (x,y)


n 2 .
(%i7)

load(interpol)$
p:[[7,2],[8,2],[1,5],[3,2],[6,7]]$
f(x):=''(lagrange(p));

(x 7) (x 6) (x 3) (x 1) (x 8) (x 6) (x 3) (x 1) 7 (x 8) (x 7) (x

+
35
12
30
(x 8) (x 7) (x 6) (x 1) (x 8) (x 7) (x 6) (x 3)
+
60
84

(%o9)

f (x) :=

Maxima

wxMaxima

(%i10) wxdraw2d(xrange = [-1,10], yrange = [-3,20],


xaxis = true, yaxis = true,
color = green,
explicit(f(x),x,-1,10),
color = blue,
point_size = 1., point_type=filled_circle,
points(p) )$

(%t10)
[] linearinterpol (points,[option]) , points (x,y)
n 2 .

(%i11) g(s):=''(linearinterpol(p,varname=s));
(
)
13 3 s

(%o11) g (s) :=
charfun2 (s, , 3)+2 charfun2 (s, 7, )+(37 5 s) charfun2 (s, 6, 7)+
2
2
)
(
5s
3 charfun2 (s, 3, 6)
3

Maxima

wxMaxima

(%i12) wxdraw2d(xrange = [-1,10], yrange = [-3,20],


xaxis = true, yaxis = true,
color = green,
explicit(g(x),x,-1,10),
color = blue,
point_size = 1., point_type=filled_circle,
points(p) )$

(%t12)
[] cspline(points,[option]) (spline) , points (x,y)
n 2 .
(%i13) h(x):=''(cspline(p,d1=0,dn=0,varname=x));
wxdraw2d(xrange = [-1,10], yrange = [-3,20],
xaxis = true, yaxis = true,
color = green,
explicit(h(x),x,-1,10),
color = blue,
point_size = 1., point_type=filled_circle,
points(p) )$
(
)
(
1949 x3 11437 x2 17027 x 1247
1547 x3 35581
(%o13) h (x) :=

+
+
+
charfun2 (x, , 3)+
2256
2256
2256
752
564
564
Maxima

wxMaxima

607 x3 35147 x2 55706 x 38420

188
564
141
47

(
)
3895 x3 1807 x2 5146 x 2148
charfun2 (x, 6, 7)+
+

+
5076
188
141
47

(%t14)
[] ratinterpol (points, numdeg[, option1, option2, ...]) ) . ,
points (x,y) n 2 , numdeg .
(%i15) r(x):=''(ratinterpol(p,3)) ;
wxdraw2d(xrange = [-1,10], yrange = [-3,20],
xaxis = true, yaxis = true,
color = green,
explicit(r(x),x,-1,10),
color = blue,
point_size = 1., point_type=filled_circle,
points(p) )$
3

(%o15)

r (x) :=

Maxima

25846x +

25 x2
47

313 x
94
73 x
423

982
141

wxMaxima

(%t16)
(%i19) map(f,[2.3,5/7,%pi]);
919062 ( 7) ( 6) ( 3) ( 1) ( 8) ( 6) ( 3) ( 1)
,

+
84035
35
12
7 ( 8) ( 7) ( 3) ( 1) ( 8) ( 7) ( 6) ( 1) ( 8) ( 7) ( 6) ( 3)

+
]
30
60
84

(%o19)

[1.567535,

(%i20) expand(%);
(%o20)

[1.567535,

919062 73 4 701 3 8957 2 5288 186


,

+
]
84035 420
210
420
105
5

(%i21) p:[[x1,y1],[x2,y2],[x3,y3]]$
lagrange(p);
(%o22)

(x x1) (x x2) y3 (x x1) (x x3) y2 (x x2) (x x3) y1


+
+
(x3 x1) (x3 x2)
(x2 x1) (x2 x3)
(x1 x2) (x1 x3)

(%i23) lagrange(p, varname=s);


(%o23)

(s x1) (s x2) y3 (s x1) (s x3) y2 (s x2) (s x3) y1


+
+
(x3 x1) (x3 x2)
(x2 x1) (x2 x3)
(x1 x2) (x1 x3)

Maxima

10

wxMaxima

Potrebbero piacerti anche