用Maxima解題
Maxima簡介[url=http://zh.wikipedia.org/wiki/Maxima]http://zh.wikipedia.org/wiki/Maxima[/url]
中文教學
h ttp://math.nccu.edu.tw/~yenlung/mynotes/maximalinear_html/maximalinear.html 連結已失效
h ttp://yenlung.math.nccu.edu.tw/index.html/idisk/maximalinear.pdf 連結已失效
h ttp://math.npue.edu.tw/front/bin/ptlist.phtml?Category=119 連結已失效
其他的教學網頁
h ttp://www.eonet.ne.jp/~kyo-ju/maxima.pdf 連結已失效
[url=http://people.ysu.edu/~gkerns/maxima/]http://people.ysu.edu/~gkerns/maxima/[/url]
[url=http://www.math.hawaii.edu/home/wxmaxima.html]http://www.math.hawaii.edu/home/wxmaxima.html[/url]
[url=http://maxima.sourceforge.net/documentation.html]http://maxima.sourceforge.net/documentation.html[/url]
101.6.16補充
h ttp://math.stanford.edu/~paquin/MaximaBook.pdf 連結已失效
討論區
h ttp://www.math.utexas.edu/pipermail/maxima/2013/ 連結已失效
101.11.13補充
h ttp://maxima-online.org 連結已失效
線上執行maxima的網頁,輸入指令後點選Calculate。
109.7.28補充
科學計算與中學數學
[url]https://www.sec.ntnu.edu.tw/uploads/asset/data/62563f9e381784d09345b9b3/4-P48-58-108024-%E6%9D%8E%E9%8C%A6%E9%8E%A3-%E7%A7%91%E5%AD%B8%E6%95%99%E5%AE%A4-%E7%A7%91%E5%AD%B8%E8%A8%88%E7%AE%97%E8%88%87%E4%B8%AD%E5%AD%B8%E6%95%B8%E5%AD%B8.pdf[/url]
Maxima by Example
[url]https://web.csulb.edu/~woollett/[/url]
110.8.4補充
wxMaxima for Calculus I
[url]https://wxmaximafor.files.wordpress.com/2015/06/wxmaxima_for_calculus_i_cq.pdf[/url]
[img]https://wxmaximafor.files.wordpress.com/2015/06/wxmaxima-for-calculus-i-thumb1.jpg?w=300&h=395&zoom=2[/img]
wxMaxima for Calculus II
[url]https://wxmaximafor.files.wordpress.com/2015/06/wxmaxima_for_calculus_ii_cq.pdf[/url]
[img]https://wxmaximafor.files.wordpress.com/2015/06/wxmaxima-for-calculus-ii-thumb1.jpg?w=300&h=395&zoom=2[/img]
當然Maple和Mathematica都是非常專業的軟體,各項功能都非常強大而且有眾多的套件可以解決不同領域的問題,這是Maxima所比不上的,但我只要能解決高中程度的問題,Maxima算是不錯的選擇
以下是我試用Maxima近一年來的筆記,放在這裡也算是個紀錄 [url=https://math.pro/db/thread-407-1-1.html]https://math.pro/db/thread-407-1-1.html[/url]
求出下列聯立方程式的解 \( x,y,z ∈R\)
$$ x+xy+xyz=12 $$
$$ y+yz+yzx=5 $$
$$ z+zx+zxy=6 $$
[img]http://www.permucode.com/maxima/wxm_ul.gif[/img][img]http://www.permucode.com/maxima/wxm_uc.gif[/img][img]http://www.permucode.com/maxima/wxm_ur.gif[/img]
[color=red](%i1)[/color] [color=blue]x+x*y+x*y*z=12; y+y*z+y*z*x=5; z+z*x+z*x*y=6;[/color]
[color=red](%o1)[/color] \( xyz+xy+x=12 \)
[color=red](%o2)[/color] \( xyz+yz+y=5 \)
[color=red](%o3)[/color] \( xyz+xz+z=6 \)
[color=green]/*
(2)式*x-(1)式
(3)式*y-(2)式
(1)式*z-(3)式*/[/color]
[color=red](%i4)[/color] [color=blue]ratsimp(%o2*x-%o1); ratsimp(%o3*y-%o2); ratsimp(%o1*z-%o3);[/color]
[color=red](%o4)[/color] \( x^2yz-x=5x-12 \)
[color=red](%o5)[/color] \( xy^2z-y=6y-5 \)
[color=red](%o6)[/color] \( xyz^2-z=12z-6 \)
[color=green]/*
得到xyz=(6x-12)/x=(7y-5)/y=(13z-6)/z*/[/color]
[color=red](%i7)[/color] [color=blue](%o4+x)/x; (%o5+y)/y; (%o6+z)/z;[/color]
[color=red](%o7)[/color] \( xyz=\frac{6x-12}{x} \)
[color=red](%o8)[/color] \( xyz=\frac{7y-5}{y} \)
[color=red](%o9)[/color] \( xyz=\frac{13z-6}{z} \)
[color=green]/*
從(6x-12)/x=(7y-5)/y 得到y
從(6x-12)/x=(13z-6)/z 得到z*/[/color]
[color=red](%i10)[/color] [color=blue]solve([rhs(%o7)=rhs(%o8),rhs(%o7)=rhs(%o9)],[y,z]);[/color]
[color=red](%o10)[/color] [ [ \( y=\frac{5x}{x+12},z=\frac{6x}{7x+12} \) ] ]
[color=green]/*
y,z分別代入(1)式*/[/color]
[color=red](%i11)[/color] [color=blue]ev(%o1,%o10[1]);[/color]
[color=red](%o11)[/color] \( \frac{30x^3}{(x+12)(7x+12)}+\frac{5x^2}{x+12}+x=12 \)
[color=green]/*
解方程式得到x的三個答案x=4,-2,-3*/
[/color]
[color=red](%i12)[/color] [color=blue]factor(%-12);[/color]
[color=red](%o12)[/color] \( \frac{72(x-4)(x+2)(x+3)}{(x+12)(7x+12)}=0 \)
[color=green]/*
將x代回y=5x/(x+12),z=6x/(7x+12)
得到答案(4,5/4,3/5),(-2,-1,6),(-3,-5/3,2)*/[/color]
[color=red](%i13)[/color] [color=Blue]ev(%o10[1],x=4);[/color]
[color=red](%o13)[/color] [ \( y=\frac{5}{4},z=\frac{3}{5} \) ]
[color=red](%i14)[/color] [color=Blue]ev(%o10[1],x=-2);[/color]
[color=red](%o14)[/color] [ \( y=-1,z=6 \) ]
[color=red](%i15)[/color] [color=Blue]ev(%o10[1],x=-3);[/color]
[color=red](%o15)[/color] [ \( y=-\frac{5}{3},z=2 \) ] 連結已失效h ttp://forum.nta.org.tw/examservice/showthread.php?t=47986
求經過(-1,-2),(0,4),(2,1),(4,-1)之等軸雙曲線方程式(97南港高工)
[color=green]/*
設等軸雙曲線方程式為x^2+a*x*y-y^2+b*x+c*y+d=0;*/[/color]
[color=red](%i)[/color] [color=blue]x^2+a*x*y-y^2+b*x+c*y+d=0;[/color]
[color=red](%o1)[/color] \( -y^2+axy+cy+x^2+bx+d=0 \)
[color=green]/*
將(-1,-2),(0,4),(2,1),(4,-1)四點的座標代入*/[/color]
[color=red](%i2)[/color] [color=blue]ev(%o1,x=-1,y=-2); ev(%o1,x= 0,y= 4); ev(%o1,x= 2,y= 1); ev(%o1,x= 4,y=-1);[/color]
[color=red](%o2)[/color] \( d-2c-b+2a-3=0 \)
[color=red](%o3)[/color] \( d+4c-16=0 \)
[color=red](%o4)[/color] \( d+c+2b+2a+3=0 \)
[color=red](%o5)[/color] \( d-c+4b-4a+15=0 \)
[color=green]/*
解聯立方程式得a,b,c,d*/[/color]
[color=red](%i6)[/color] [color=blue]solve([%o2,%o3,%o4,%o5],[a,b,c,d]);[/color]
[color=red](%o6)[/color] [[ \( a=-\frac{10}{19} , b=-\frac{91}{19} , c=\frac{53}{19} , d=\frac{92}{19} \) ]]
[color=green]/*
將a,b,c,d代回原式得到答案[/color]
[color=red](%i7)[/color] [color=blue]ev(%o1,%[1]);[/color]
[color=red](%o7)[/color] \( -y^2-\frac{10xy}{19}+\frac{53y}{19}+x^2-\frac{91x}{19}+\frac{92}{19}=0 \)
[color=red](%i8)[/color] [color=blue]ratsimp(%*19);[/color]
[color=red](%o8)[/color] \( -y^2+(53-10x)y+19x^2-91x+92=0 \) TRML2002團體賽
設實數數列\( <a_n> \)滿足\( a_n=a_{n-1}-a_{n-1} \) (\( n=1,2,... \)),且\( a_{100}=1 \),\( a_{200}=2 \),試求\( a_{300} \)。
[img]http://www.permucode.com/maxima/wxm_ul.gif[/img][img]http://www.permucode.com/maxima/wxm_uc.gif[/img][img]http://www.permucode.com/maxima/wxm_ur.gif[/img]
[color=red](%i1)[/color] [color=blue]a[1]:a$ a[2]:b$ a[n]:=a[n-1]-a[n-2];[/color]
[color=red](%o3)[/color] \( a_n:=a_{n-1}-a_{n-2} \)
[color=green]/*
列出數列前12項發現每隔6個一循環*/[/color]
[color=red](%i4)[/color] [color=blue]for n:1 thru 12 do print("a[",n,"]=",a[n]);[/color]
\( a[ 1 ]= a \)
\( a[ 2 ]= b \)
\( a[ 3 ]= b-a \)
\( a[ 4 ]= -a \)
\( a[ 5 ]= -b \)
\( a[ 6 ]= a-b \)
\( a[ 7 ]= a \)
\( a[ 8 ]= b \)
\( a[ 9 ]= b-a \)
\( a[ 10 ]= -a \)
\( a[ 11 ]= -b \)
\( a[ 12 ]= a-b \)
[color=red](%o4)[/color] done
[color=green]/*
第100項為1,a=-1*/[/color]
[color=red](%i5)[/color] [color=blue]a[100]=1;[/color]
[color=red](%o5)[/color] \( -a=1 \)
[color=green]/*
第200項為2,b=2*/[/color]
[color=red](%i6)[/color] [color=blue]a[200]=2;[/color]
[color=red](%o6)[/color] \( b=2 \)
[color=green]/*
第300項為-3*/[/color]
[color=red](%i7)[/color] [color=blue]a[300];[/color]
[color=red](%o7)[/color] \( a-b \)
[img]http://www.permucode.com/maxima/wxm_ll.gif[/img][img]http://www.permucode.com/maxima/wxm_lc.gif[/img][img]http://www.permucode.com/maxima/wxm_lr.gif[/img]
[[i] 本帖最後由 bugmens 於 2009-3-31 10:03 PM 編輯 [/i]] TRML2007個人賽
設數列{\( a_{n} \)}滿足\( a_{n+2}=a_{n+1}-a_{n} \)且\( a_{2}=96 \)。已知此數列前2005項的和等於2006,則此數列前2007項的和等於
[img]http://www.permucode.com/maxima/wxm_ul.gif[/img][img]http://www.permucode.com/maxima/wxm_uc.gif[/img][img]http://www.permucode.com/maxima/wxm_ur.gif[/img]
[color=red](%i1)[/color] [color=blue]a[1]:a$ a[2]:b$ a[n]:=a[n-1]-a[n-2];[/color]
[color=red](%o3)[/color] \( a_{n}:=a_{n-1}-a_{n-2} \)
[color=green]/*
第2項為96,b=96[/color]
[color=red](%i5)[/color] [color=blue]a[2]=96;[/color]
[color=red](%o5)[/color] \( b=96 \)
[color=green]/*
前2005項的和為2006,a=2006[/color]
[color=red](%i6)[/color] [color=blue]sum(a[k],k,1,2005)=2006;[/color]
[color=red](%o6)[/color] \( a=2006 \)
[color=green]/*
前2007項的和為2b=192[/color]
[color=red](%i7)[/color] [color=blue]sum(a[k],k,1,2007);[/color]
[color=red](%o7)[/color] \( 2b \)
[img]http://www.permucode.com/maxima/wxm_ll.gif[/img][img]http://www.permucode.com/maxima/wxm_lc.gif[/img][img]http://www.permucode.com/maxima/wxm_lr.gif[/img] 滿足方程組\( \frac{1}{x}+\frac{1}{2 y}=(x^2+3y^2)(3x^2+y^2) \),\( \frac{1}{x}-\frac{1}{2 y}=2(y^4-x^4) \)的實數對\( (x,y) \)。
William Lowell Putnam Mathematical Competition 2001,97中一中
[url=http://forum.nta.org.tw/examservice/showthread.php?t=46779#8]http://forum.nta.org.tw/examservice/showthread.php?t=46779#8[/url]
2006 全國高中數學能力競賽台北市試題
[url=http://www.math.nuk.edu.tw/senpengeu/HighSchool/2006_Taiwan_High_TaipeiCity_02.pdf]http://www.math.nuk.edu.tw/senpe ... h_TaipeiCity_02.pdf[/url]
2005 全國高中數學能力競賽台灣省雲嘉區試題
[url=http://www.math.nuk.edu.tw/senpengeu/HighSchool/2005_Taiwan_High_ChiaYi_01.pdf]http://www.math.nuk.edu.tw/senpe ... _High_ChiaYi_01.pdf[/url]
[img]http://www.permucode.com/maxima/wxm_ul.gif[/img][img]http://www.permucode.com/maxima/wxm_uc.gif[/img][img]http://www.permucode.com/maxima/wxm_ur.gif[/img]
[color=red](%i1)[/color] [color=blue]1/x+1/(2*y)=(x^2+3*y^2)*(3*x^2+y^2);[/color]
[color=red](%o1)[/color] \( \frac{1}{2y}+\frac{1}{x}=(y^2+3x^2)(3y^2+x^2) \)
[color=red](%i2)[/color] [color=blue]1/x-1/(2*y)=2*(y^4-x^4);[/color]
[color=red](%o2)[/color] \( \frac{1}{x}-\frac{1}{2y}=2(y^4-x^4) \)
[color=red](%i3)[/color] [color=blue](%o1+%o2)*x; (%o1-%o2)*y;[/color]
[color=red](%o3)[/color] \( 2=x(2(y^4-x^4)+(y^2+3x^2)(3y^2+x^2)) \)
[color=red](%o4)[/color] \( 1=y((y^2+3x^2)(3y^2+x^2)-2(y^4-x^4)) \)
[color=red](%i5)[/color] [color=blue]ratsimp(%o3); ratsimp(%o4);[/color]
[color=red](%o5)[/color] \( 2=5xy^4+10x^3 y^2+x^5 \)
[color=red](%o6)[/color] \( 1=y^5+10x^2y^3+5x^4y \)
[color=red](%i7)[/color] [color=blue]factor(%o5+%o6); factor(%o5-%o6);[/color]
[color=red](%o7)[/color] \( 3=(y+x)^5 \)
[color=red](%o8)[/color] \( 1=-(y-x)^5 \)
[color=red](%i9)[/color] [color=blue]%o7^(1/5); %o8^(1/5);[/color]
[color=red](%o9)[/color] \( 3^{1/5}=y+x \)
[color=red](%o10)[/color] \( 1=x-y \)
[color=red](%i11)[/color] [color=blue]solve([%o9,%o10],[x,y]);[/color]
[color=red](%o11)[/color] \( [ [x=\frac{3^{1/5}+1}{2},y=\frac{3^{1/5}-1}{2}] ] \)
[img]http://www.permucode.com/maxima/wxm_ll.gif[/img][img]http://www.permucode.com/maxima/wxm_lc.gif[/img][img]http://www.permucode.com/maxima/wxm_lr.gif[/img]
[[i] 本帖最後由 bugmens 於 2009-4-18 01:26 AM 編輯 [/i]] 用利美佛定理,表示出sin5θ=?(用sinθ表示),cos5θ=?(用cosθ表示)(新竹高中)
[url=http://forum.nta.org.tw/oldphpbb2/viewtopic.php?t=4189]http://forum.nta.org.tw/oldphpbb2/viewtopic.php?t=4189[/url]
用cosθ來表示cos5θ?(95士林高商)
[url=http://forum.nta.org.tw/oldphpbb2/viewtopic.php?t=41891]http://forum.nta.org.tw/oldphpbb2/viewtopic.php?t=41891[/url]
[img]http://www.permucode.com/maxima/wxm_ul.gif[/img][img]http://www.permucode.com/maxima/wxm_uc.gif[/img][img]http://www.permucode.com/maxima/wxm_ur.gif[/img]
[color=green]利用利美佛定理,對(cosx+i*sinx)^5展開
cos5x+i*sin5x=(cosx+i*sinx)^5[/color]
[color=red](%i1)[/color] [color=blue]expand((cos(x)+%i*sin(x))^5);[/color]
[color=red](%o1)[/color] \( i sin(x)^{5}+5 cos(x)sin(x)^{4}-10 i cos(x)^{2}sin(x)^{3}-10 cos(x)^{3} sin(x)^{2}+5 i cos(x)^{4} sin(x)+cos(x)^{5} \)
[color=green]分出實部虛部[/color]
[color=red](%i2)[/color] [color=blue]realpart(%)+%i*imagpart(%);[/color]
[color=red](%o2)[/color] \( i \left(sin(x)^{5}-10cos(x)^{2}sin(x)^{3}+5 cos(x)^{4}sin(x) \right)+5cos(x)sin(x)^{4}-10cos(x)^{3}sin(x)^{2}+cos(x)^{5} \)
[color=green]實部用sin(x)^2=1-cos(x)^2換掉
虛部用cos(x)^2=1-sin(x)^2換掉[/color]
[color=red](%i3)[/color] [color=blue]ratsubst(1-cos(x)^2,sin(x)^2,realpart(%o2))+%i*(ratsubst(1-sin(x)^2,cos(x)^2,imagpart(%o2)));[/color]
[color=red](%o3)[/color] \( i \left(16sin(x)^{5}-20sin(x)^{3}+5sin(x) \right)+16cos(x)^{5}-20cos(x)^{3}+5cos(x) \)
[color=green]另一種直接得到答案的方法[/color]
[color=red](%i4)[/color] [color=blue]trigexpand(cos(5*x));[/color]
[color=red](%o4)[/color] \( 5cos(x)sin(x)^{4}-10cos(x)^{3}sin(x)^{2}+cos(x)^5 \)
[color=red](%i5)[/color] [color=blue]ratsubst(1-cos(x)^2,sin(x)^2,%);[/color]
[color=red](%o5)[/color] \( 16 cos(x)^{5}-20 cos(x)^{3}+5 cos(x) \)
[color=green]sin(5x)的答案[/color]
[color=red](%i6)[/color] [color=blue]trigexpand(sin(5*x));[/color]
[color=red](%o6)[/color] \( sin(x)^{5}-10 cos(x)^{2}sin(x)^{3}+5 cos(x)^{4}sin(x) \)
[color=red](%i7)[/color] [color=blue]ratsubst(1-sin(x)^2,cos(x)^2,%);[/color]
[color=red](%o7)[/color] \( 16 sin(x)^{5}-20 sin(x)^{3}+5 sin(x) \)
[img]http://www.permucode.com/maxima/wxm_ll.gif[/img][img]http://www.permucode.com/maxima/wxm_lc.gif[/img][img]http://www.permucode.com/maxima/wxm_lr.gif[/img] 求\( \frac{1}{(x-3)(x-2)^2} \)第八項的係數?
(97松山工農)
100.10.30補充題目出處
求\( \displaystyle \frac{1}{(x-3)(x-2)^2} \)中\( x^8 \)的係數。
答案:\( \displaystyle -\Bigg(\; \frac{1}{3} \Bigg)\; ^9-7 \Bigg(\; \frac{1}{2} \Bigg)\; ^{10} \)
張福春、曾介玫,一般生成函數之應用,數學傳播32卷3期 pp.12-35
[img]http://www.permucode.com/maxima/wxm_ul.gif[/img][img]http://www.permucode.com/maxima/wxm_uc.gif[/img][img]http://www.permucode.com/maxima/wxm_ur.gif[/img]
[color=green]/*
設定次方從小排到大*/[/color]
[color=red](%i)[/color] [color=blue]powerdisp : true;[/color]
[color=red](%o1)[/color] true
[color=green]/*
假設1/((x-3)*(x-2)^2)展開式為
a0+a1x+a2x^2+a3x^3+...
[/color]
[color=red](%i2)[/color] [color=blue]1/((x-3)*(x-2)^2)=sum(a[k]*x^k,k,0,10);[/color]
[color=red](%o2)[/color] \( \frac{1}{(-3+x)(-2+x)^2}=a_{0}+a_{1}x+a_{2}x^{2}+a_{3}x^{3}+a_{4}x^{4}+a_{5}x^{5}+a_{6}x^{6}+a_{7}x^{7}+a_{8}x^{8}+a_{9}x^{9}+a_{10}x^{10} \)
[color=green]/*
將1/((x-3)*(x-2)^2)換成部分分式*/[/color]
[color=red](%i3)[/color] [color=blue]partfrac(lhs(%),x)=rhs(%);[/color]
[color=red](%o3)[/color] \( \frac{1}{-3+x}-\frac{1}{(-2+x)^2}-\frac{1}{-2+x}=a_{0}+a_{1}x+a_{2}x^{2}+a_{3}x^{3}+a_{4}x^{4}+a_{5}x^{5}+a_{6}x^{6}+a_{7}x^{7}+a_{8}x^{8}+a_{9}x^{9}+a_{10}x^{10} \)
[color=green]/*
兩邊作八次微分*/[/color]
[color=red](%i4)[/color] [color=blue]diff(%, x, 8);[/color]
[color=red](%o4)[/color] \( \frac{40320}{(-3+x)^9}-\frac{362880}{(-2+x)^10}-\frac{40320}{(-2+x)^9}=40320 a_{8}+362880 a_{9}x+1814400 a_{10}x^2 \)
[color=green]/*
用x=0代入,將其他x^n項去掉*/[/color]
[color=red](%i5)[/color] [color=blue]ev(%,x=0);[/color]
[color=red](%o5)[/color] \( -\frac{4858175}{17496}=40320 a_{8} \)
[color=green]/*
兩邊同除8!=40320得到答案*/[/color]
[color=red](%i6)[/color] [color=blue]%/40320;[/color]
[color=red](%o6)[/color] \( -\frac{138805}{20155392}=a_{8} \)
[color=green]/*
用泰勒展開式驗證答案*.[/color]
[color=red](%i7)[/color] [color=blue]taylor(1/((x-3)*(x-2)^2),x,0,8);[/color]
[color=red](%o7)[/color] \( -\frac{1}{12}-\frac{x}{9}-\frac{43x^{2}}{432}-\frac{97x^{3}}{1296}-\frac{793x^{4}}{15552}-\frac{761x^{5}}{23328}-\frac{11191x^{6}}{559872}-\frac{19939x^{7}}{1679616}-\frac{138805x^{8}}{20155392}+... \)
[img]http://www.permucode.com/maxima/wxm_ll.gif[/img][img]http://www.permucode.com/maxima/wxm_lc.gif[/img][img]http://www.permucode.com/maxima/wxm_lr.gif[/img]
[[i] 本帖最後由 bugmens 於 2011-10-30 07:02 PM 編輯 [/i]] 半徑為1cm、2cm、3cm的三個圓互相外切,如圖所示。有一個圓落於它們之間,分別與這三個外切,求這個小圓的半徑。
(98國立清水高中,[url=https://math.pro/db/thread-836-1-1.html]https://math.pro/db/thread-836-1-1.html[/url])
[img]http://www.permucode.com/maxima/wxm_ul.gif[/img][img]http://www.permucode.com/maxima/wxm_uc.gif[/img][img]http://www.permucode.com/maxima/wxm_ur.gif[/img]
[color=red](%i1)[/color] [color=blue](x-0)^2+(y-3)^2=(2+r)^2;[/color]
[color=blue](x-0)^2+(y-0)^2=(1+r)^2;[/color]
[color=blue](x-4)^2+(y-0)^2=(3+r)^2;[/color]
[color=red](%o1)[/color] \( (y-3)^2+x^2=(r+2)^2 \)
[color=red](%o2)[/color] \( y^2+x^2=(r+1)^2 \)
[color=red](%o3)[/color] \( y^2+(x-4)^2=(r+3)^2 \)
[color=green]解出x[/color]
[color=red](%i4)[/color] [color=blue]ratsimp(%o2-%o3); solve(%,[x]);[/color]
[color=red](%o4)[/color] \( 8x-16=-4r-8 \)
[color=red](%o5)[/color] \( \displaystyle [\ x=-\frac{r-2}{2} ]\ \)
[color=green]解出y[/color]
[color=red](%i6)[/color] [color=blue]ratsimp(%o2-%o1); solve(%,[y]);[/color]
[color=red](%o6)[/color] \( 6y-9=-2r-3 \)
[color=red](%o7)[/color] \( \displaystyle [\ y=-\frac{r-3}{3} ]\ \)
[color=green]代回(2)式,得到r的方程式[/color]
[color=red](%i8)[/color] [color=blue]subst(rhs(%o5[1]),x,%o2);[/color]
[color=red](%o8)[/color] \( \displaystyle y^2+\frac{(r-2)^2}{4}=(r+1)^2 \)
[color=red](%i9)[/color] [color=blue]subst(rhs(%o7[1]),y,%);[/color]
[color=red](%o9)[/color] \( \displaystyle \frac{(r-2)^2}{4}+\frac{(r-3)^2}{9}=(r+1)^2 \)
[color=green]解出r值[/color]
[color=red](%i10)[/color] [color=blue]solve(%,[r]);[/color]
[color=red](%o10)[/color] \( \displaystyle [\ r=\frac{6}{23},r=-6 ]\ \)
[color=green]得圓心座標[/color]
[color=red](%i11)[/color] [color=blue]ev(%o5,%o10[1]);ev(%o7,%o10[1]);[/color]
[color=red](%o11)[/color] \( \displaystyle [\ x=\frac{20}{23} ]\ \)
[color=red](%o12)[/color] \( \displaystyle [\ y=\frac{21}{23} ]\ \)
[img]http://www.permucode.com/maxima/wxm_ll.gif[/img][img]http://www.permucode.com/maxima/wxm_lc.gif[/img][img]http://www.permucode.com/maxima/wxm_lr.gif[/img]
[[i] 本帖最後由 bugmens 於 2009-8-2 06:33 AM 編輯 [/i]] 題目出處 [url=https://math.pro/db/thread-857-1-1.html]https://math.pro/db/thread-857-1-1.html[/url]
[img]https://math.pro/db/attachments/20090903_c26ea878d2a4a36357a4RwoAq54Jg3hH.png[/img]
假設a,b是實數來解題,只是\( \overline{z_1 z_2} \)不曉得是相乘取共軛複數還是\( z_1 , z_2 \)在複數平面的距離
[img]http://www.permucode.com/maxima/wxm_ul.gif[/img][img]http://www.permucode.com/maxima/wxm_uc.gif[/img][img]http://www.permucode.com/maxima/wxm_ur.gif[/img]
[color=green]設定實部在前,虛部在後[/color]
[color=red](%i)[/color] [color=blue]powerdisp:true;[/color]
[color=red](%o)[/color] true
[color=green]設定z1為√3/2*a+(a+1)i[/color]
[color=red](%2)[/color] [color=blue]z1:sqrt(3)/2*a+(a+1)*%i;[/color]
[color=red](%o2)[/color] \( \frac{\sqrt{3}a}{2}+%i(1+a) \)
[color=green]設定z2為-3√3b+(b+2)i[/color]
[color=red](%i3)[/color] [color=blue]z2:-3*sqrt(3)*b+(b+2)*%i;[/color]
[color=red](%o3)[/color] \( -3^{3/2}b+%i(2+b) \)
[color=green]將3z1^2+z2^2展開[/color]
[color=red](%i4)[/color] [color=blue]expand(3*z1^2+z2^2);[/color]
[color=red](%o4)[/color] \( \displaystyle -7-6a+3^{3/2}%i a-\frac{3a^2}{4}+3^{3/2}%ia^2-4b-4 \cdot 3^{3/2}%i b+26b^2-2 \cdot 3^{3/2}%i b^2 \)
[color=green]將實部和虛部分開[/color]
[color=red](%i5)[/color] [color=blue]realpart(%o4)=0;imagpart(%o4)=0;[/color]
[color=red](%o5)[/color] \( -7-6a-\frac{3a^2}{4}-4b+26b^2=0 \)
[color=red](%o6)[/color] \( 3^{3/2}+3^{3/2}a^2-4 \cdot 3^{3/2}b-2 \cdot 3^{3/2}b^2=0 \)
[color=red](%i7)[/color] [color=blue]ratsimp(%o5*4);ratsimp(%o6/3^(3/2));[/color]
[color=red](%o7)[/color] \( -28-24a-3a^2-16b+104b^2=0 \)
[color=red](%o8)[/color] \( a+a^2-4b-2b^2=0 \)
[color=green]得到a的解析式[/color]
[color=red](%i9)[/color] [color=blue]solve(%o7+%o8*3,a);[/color]
[color=red](%o9)[/color] \( \displaystyle [a=\frac{-4-4b+14b^2}{3}] \)
[color=green]代回%o8,得到b的答案[/color]
[color=red](%i10)[/color] [color=blue]ev(%o8,%o9);factor(%);[/color]
[color=red](%o10)[/color] \( \displaystyle -4b-2b^2+\frac{-4-4b+14b^2}{3}+\frac{(-4-4b+14b^2)^2}{9}=0 \)
[color=red](%o11)[/color] \( \displaystyle \frac{4(-1+b)(-1+7b)(1+4b+7b^2)}{9}=0 \)
[color=green]代回%o9,得到a的答案[/color]
[color=red](%i12)[/color] [color=blue]ev(%o9,b=1);ev(%o9,b=1/7);[/color]
[color=red](%o12)[/color] \( [a=2] \)
[color=red](%o13)[/color] \( [a=\frac{10}{7}] \)
[color=green]或者直接用solve解%o7,%o8得a,b兩組答案[/color]
[color=red](%i14)[/color] [color=blue]solve([%o7,%o8],[a,b]);[/color]
[color=red](%o14)[/color] \( \displaystyle[[a=2,b=1],[a=\frac{10}{7},b=\frac{1}{7}]] \)
[color=green]代回%o2,%o3,得到z1,z2兩組答案[/color]
[color=red](%i15)[/color] [color=blue]ev([%o2,%o3],%o14[1]);[/color]
[color=red](%o15)[/color] \( [\sqrt{3}+3%i,-3^{3/2}+3 % i] \)
[color=red](%i16)[/color] [color=blue]ev([%o2,%o3],%o14[2]);[/color]
[color=red](%o16)[/color] \( \displaystyle [-\frac{5 \sqrt{3}}{7}-\frac{3%i}{7},-\frac{3^{3/2}}{7}+\frac{15 %i}{7}] \)
[img]http://www.permucode.com/maxima/wxm_ll.gif[/img][img]http://www.permucode.com/maxima/wxm_lc.gif[/img][img]http://www.permucode.com/maxima/wxm_lr.gif[/img]
[[i] 本帖最後由 bugmens 於 2009-9-16 11:06 AM 編輯 [/i]] 設a與b均為整數。已知\( ax^5+bx^4+1 \)可被\( x^2-x-1 \)整除,試求\( a+b \)之值。
(1999TRML接力賽)
已知多項式\( ax^9+bx^8+1 \)被\( x^2-x-1 \)整除,則數對\( (a,b)= \)?
(2006年中一中第1次學測模擬考,h ttp://jflaith.myweb.hinet.net/ra/RA130.swf 連結已失效)
已知m,n是整數,且\( mx^{17}+nx^{16}+1 \)是\( x^2+x-1 \)的倍式,則m=?
(97中和高中)
這題問的是\( x^2+x-1 \)答案是-987
和下面幾題\( x^2-x-1 \)答案是+987,要注意
Find a if a and b are integers such that \( x^2-x-1 \) is a factor of \( ax^{17}+bx^{16}+1 \).
(1988AIME)
\( a,b \in Z \),若\( ax^{17}+bx^{16}+1 \)能被\( x^2-x-1 \)整除,求\( a= \)?
(94嘉義女中,h ttp://forum.nta.org.tw/oldphpbb2/viewtopic.php?t=21358 連結已失效)
設a,b為整數,且\( x^2-x-1 \)整除\( ax^{17}+bx^{16}+1 \),試求a之值?
(2006TRML團體賽)
已知a,b為實數,若\( ax^{17}+bx^{16}+1 \)能被\( x^2-x-1 \)整除,則a=?
(100麗山高中,[url]https://math.pro/db/thread-1138-1-1.html[/url])
(100楊梅高中,[url]https://math.pro/db/thread-1162-1-2.html[/url])
106.9.17補充
設\(a,b\)為整數,如果多項式\(x^2-x-1\)為\(ax^{17}+bx^{16}+1\)的因式,試求\(a\)之值。
(104高中數學能力競賽,[url]https://math.pro/db/thread-2466-1-6.html[/url])
[img]http://www.permucode.com/maxima/wxm_ul.gif[/img][img]http://www.permucode.com/maxima/wxm_uc.gif[/img][img]http://www.permucode.com/maxima/wxm_ur.gif[/img]
[color=red](%i)[/color] [color=blue]fx:a*x^17+b*x^16+1;[/color]
[color=red](%o1)[/color] \( ax^{17}+bx^{16}+1 \)
[color=green]將x^2換成x+1降次方,直到最高次方為1次停止[/color]
[color=red](%i2)[/color]
[color=blue]while (hipow(fx,x)>1) do
(fx:ratsubst(x+1,x^2,fx),
print(fx)
)$[/color]
[color=red](%o2)[/color]
\( ax^9+(b+8a)x^8+(8b+28a)x^7+(28b+56a)x^6+(56b+70a)x^5+(70b+56a)x^4+(56b+28a)x^3+(28b+8a)x^2+(8b+a)x+b+1 \)
\( ax^5+(9b+40a)x^4+(112b+248a)x^3+(352b+528a)x^2+(384b+448a)x+128b+128a+1 \)
\( ax^3+(121b+290a)x^2+(866b+1305a)x+489b+696a+1 \)
\( ax^2+(987b+1596a)x+610b+986a+1 \)
\( (987b+1597a)x+610b+987a+1 \)
[color=green]x項和常數項係數為0,解a,b
987b+1597a=0
610b+987a+1=0[/color]
[color=red](%i3)[/color] [color=blue]solve([coeff(fx,x,1)=0,coeff(fx,x,0)=0],[a,b]);[/color]
[color=red](%o3)[/color] \( [ [a=987,b=-1597] ] \)
[color=green]利用for迴圈,將前16項的答案列出來發現和費波那契數列有關係[/color]
[color=red](%i4)[/color]
[color=blue]for i:1 thru 16 do
(fx:a*x^(i+1)+b*x^i+1,
while (hipow(fx,x)>1) do
(fx:ratsubst(x+1,x^2,fx)),
print(fx,solve([coeff(fx,x,1)=0,coeff(fx,x,0)=0],[a,b]))
)$[/color]
[color=red](%o4)[/color]
\( (b+a)x+a+1 [ [a=-1,b=1] ] \)
\( (b+2a)x+b+a+1 [ [a=1,b=-2] ] \)
\( (2b+3a)x+b+2a+1 [ [a=-2,b=3] ] \)
\( (3b+5a)x+2b+3a+1 [ [a=3,b=-5] ] \)
\( (5b+8a)x+3b+5a+1 [ [a=-5,b=8] ] \)
\( (8b+13a)x+5b+8a+1 [ [a=8,b=-13] ] \)
\( (13b+21a)x+8b+13a+1 [ [a=-13,b=21] ] \)
\( (21b+34a)x+13b+21a+1 [ [a=21,b=-34] ] \)
\( (34b+55a)x+21b+34a+1 [ [a=-34,b=55] ] \)
\( (55b+89a)x+34b+55a+1 [ [a=55,b=-89] ] \)
\( (89b+144a)x+55b+89a+1 [ [a=-89,b=144] ] \)
\( (144b+233a)x+89b+144a+1 [ [a=144,b=-233] ] \)
\( (233b+377a)x+144b+233a+1 [ [a=-233,b=377] ] \)
\( (377b+610a)x+233b+377a+1 [ [a=377,b=-610] ] \)
\( (610b+987a)x+377b+610a+1 [ [a=-610,b=987] ] \)
\( (987b+1597a)x+610b+987a+1 [ [a=987,b=-1597] ] \)
[img]http://www.permucode.com/maxima/wxm_ll.gif[/img][img]http://www.permucode.com/maxima/wxm_lc.gif[/img][img]http://www.permucode.com/maxima/wxm_lr.gif[/img]
可以看到\( a,b \)形成費波那契數列,考試時加一加就可以得到答案
而且610*b+987a+1=0,可視為-F(15)*F(17)+F(16)*F(16)+1=0
在 [url=http://en.wikipedia.org/wiki/Fibonacci_number]http://en.wikipedia.org/wiki/Fibonacci_number[/url] 可以找到一般式
\( (-1)^n=F_{n+1}F_{n-1}-F^2_n \)
100.11.28補充
原來這恆等式是有名字的
[url]http://en.wikipedia.org/wiki/Cassini_and_Catalan_identities[/url]
[url]http://mathworld.wolfram.com/CassinisIdentity.html[/url]
[[i] 本帖最後由 bugmens 於 2017-9-17 04:55 編輯 [/i]] [img]http://www.permucode.com/maxima/wxm_ul.gif[/img][img]http://www.permucode.com/maxima/wxm_uc.gif[/img][img]http://www.permucode.com/maxima/wxm_ur.gif[/img]
[color=green]利用部分分式求積分[/color]
[color=red](%i1)[/color] [color=blue]'integrate(x/(x^3+4*x^2+5*x+2), x);[/color]
[color=red](%o1)[/color] \( \displaystyle \int \frac{x}{x^3+4x^2+5x+2}dx \)
[color=green]找出分母的因式[/color]
[color=red](%i2)[/color] [color=blue]factor(denom(part(%,1)));[/color]
[color=red](%o2)[/color] \( (x+1)^2(x+2) \)
[color=green]設定部分分式,假設a,b,c為各分式的係數[/color]
[color=red](%i3)[/color] [color=blue]part(%o1,1)=a/(x+2)+b/(x+1)+c/(x+1)^2;[/color]
[color=red](%o3)[/color] \( \displaystyle \frac{x}{x^3+4x^2+5x+2}=\frac{a}{x+2}+\frac{b}{x+1}+\frac{c}{(x+1)^2} \)
[color=green]分式通分[/color]
[color=red](%i4)[/color] [color=blue]ratsimp(%);[/color]
[color=red](%o4)[/color] \( \displaystyle \frac{x}{x^3+4x^2+5x+2}=\frac{(b+a)x^2+(c+3b+2a)x+2c+2b+a}{x^3+4x^2+5x+2} \)
[color=green]去掉分母[/color]
[color=red](%i5)[/color] [color=blue]%*denom(lhs(%));[/color]
[color=red](%o5)[/color] \( x=(b+a)x^2+(c+3b+2a)x+2c+2b+a \)
[color=green]比較等號兩邊x^2項,x項,常數項係數[/color]
[color=red](%i6)[/color] [color=blue]coeff(%o5,x,0);coeff(%o5,x,1);coeff(%o5,x,2);[/color]
[color=red](%o6)[/color] \( 0=2c+2b+a \)
[color=red](%o7)[/color] \( 1=c+3b+2a \)
[color=red](%o8)[/color] \( 0=b+a \)
[color=green]解出未知數a,b,c[/color]
[color=red](%i9)[/color] [color=blue]solve([%o6,%o7,%o8],[a,b,c]);[/color]
[color=red](%o9)[/color] \( [ [a=-2,b=2,c=-1] ] \)
[color=green]將a,b,c代回部分分式[/color]
[color=red](%i10)[/color] [color=blue]ev(%o3,part(%o9,1));[/color]
[color=red](%o10)[/color] \( \displaystyle \frac{x}{x^3+4x^2+5x+2}=-\frac{2}{x+2}+\frac{2}{x+1}-\frac{1}{(x+1)^2} \)
[color=green]或者一開始用partfrac直接得到部分分式[/color]
[color=red](%i11)[/color] [color=blue]partfrac(part(%o1,1),x);[/color]
[color=red](%o11)[/color] \( \displaystyle -\frac{2}{x+2}+\frac{2}{x+1}-\frac{1}{(x+1)^2} \)
[color=green]將各部分分式積分[/color]
[color=red](%i12)[/color] [color=blue]integrate(%, x);[/color]
[color=red](%o12)[/color] \( \displaystyle -2 log(x+2)+2 log(x+1)+\frac{1}{x+1} \)
[color=green]答案就和integrate指令算出來的結果相同[/color]
[color=red](%i13)[/color] [color=blue]integrate(x/(x^3+4*x^2+5*x+2), x);[/color]
[color=red](%o13)[/color] \( \displaystyle -2 log(x+2)+2 log(x+1)+\frac{1}{x+1} \)
[img]http://www.permucode.com/maxima/wxm_ll.gif[/img][img]http://www.permucode.com/maxima/wxm_lc.gif[/img][img]http://www.permucode.com/maxima/wxm_lr.gif[/img] 版大您好,我想請教一下您是如何將下列的內容擷取出來的,
[color=red](%i4)[/color] [color=blue]ratsimp(%o2*x-%o1); ratsimp(%o3*y-%o2); ratsimp(%o1*z-%o3);[/color]
[color=red](%o4)[/color] x2
yz
−x=5x−12
[color=red](%o5)[/color] xy
2
z
−y
=6y
−5
[color=red](%o6)[/color] xyz
2
−z
=12z
−6
我使用複製會變成下面的樣子
/* [wxMaxima: input start ] */
ratsimp(%o2*x-%o1); ratsimp(%o3*y-%o2); ratsimp(%o1*z-%o3);
/* [wxMaxima: input end ] */
選擇copy as image會變成圖檔,怎麼試就是試不出來變成您post的內容那樣有紅色和藍色且可以選取複製,我使用的是0.8.3的版本,謝謝! 回答上面的問題
maxima沒有直接轉換的指令,這是我用論壇的指令拼湊出來的
全形的[和]請自行替換成半形的[和]
[img]h ttp://www.permucode.com/maxima/wxm_ul.gif[/img]
[img]h ttp://www.permucode.com/maxima/wxm_uc.gif[/img]
[img]h ttp://www.permucode.com/maxima/wxm_ur.gif[/img]
[color=red](%i1)[/color] [color=blue]x^2-4xy+6y^2-2x-20y-29[/color]
[color=red](%o1)[/color] \( 6y^2-4xy-20y+x^2-2x-29 \)
[img]h ttp://www.permucode.com/maxima/wxm_ll.gif[/img]
[img]h ttp://www.permucode.com/maxima/wxm_lc.gif[/img]
[img]h ttp://www.permucode.com/maxima/wxm_lr.gif[/img]
-------------------------
求\( x^2-4xy+6y^2-2x-20y=29 \)的正整數解。
(91高中數學能力競賽 台中區複賽試題(二))
[url=http://www.math.nuk.edu.tw/senpengeu/HighSchool/2003_Taiwan_High_Taichung_02.pdf]http://www.math.nuk.edu.tw/senpengeu/HighSchool/2003_Taiwan_High_Taichung_02.pdf[/url]
[img]http://www.permucode.com/maxima/wxm_ul.gif[/img][img]http://www.permucode.com/maxima/wxm_uc.gif[/img][img]http://www.permucode.com/maxima/wxm_ur.gif[/img]
[color=red](%i1)[/color] [color=blue]x^2-4*x*y+6*y^2-2*x-20*y-29[/color]
[color=red](%o1)[/color] \( 6y^2-4xy-20y+x^2-2x-29 \)
[color=green]先整理成x的方程式[/color]
[color=red](%i2)[/color] [color=blue]collectterms(%o1,x);[/color]
[color=red](%o2)[/color] \( 6y^2-20y+x(-4y-2)+x^2-29 \)
[color=red](%i3)[/color] [color=blue]a:coeff(%o1,x,2);b:coeff(%o1,x,1);c:coeff(%o1,x,0);[/color]
[color=red](%o3)[/color] 1
[color=red](%o4)[/color] \( -4y-2 \)
[color=red](%o5)[/color] \( 6y^2-20y-29 \)
[color=green]求x的判別式[/color]
[color=red](%i6)[/color] [color=blue]b^2-4*a*c;[/color]
[color=red](%o6)[/color] \( (-4y-2)^2-4(6y^2-20y-29) \)
[color=green]或者用poly_discriminant得判別式[/color]
[color=red](%i7)[/color] [color=blue]poly_discriminant(%o1,x);[/color]
[color=red](%o7)[/color] \( -8y^2+96y+120 \)
[color=red](%i8)[/color] [color=blue]load("solve_rat_ineq.mac");[/color]
[color=red](%o8)[/color] C:/PROGRA~1/MAXIMA~1.2/share/maxima/5.19.2/share/contrib/solve_rat_ineq.mac
[color=green]解出y的範圍[/color]
[color=red](%i9)[/color] [color=blue]solve_rat_ineq(%o6>=0);[/color]
[color=red](%o9)[/color] \( [ [y\ge 6-\sqrt{51},y\le \sqrt{51}+6] ] \)
[color=red](%i10)[/color] [color=blue]float(%[1]);[/color]
[color=red](%o10)[/color] \( [ y \ge -1.14142842854285,y \le 13.14142842854285 ] \)
[color=red](%i11)[/color]
[color=blue]solution:[]$
for valy:-1 thru 13 do /*y值從-1到13一個個檢驗*/
(fx:ev(%o1,y:valy), /*y代回原方程式*/
for x in solve(fx,x) do /*對x解方程式*/
(valx:rhs(x),
if numberp(valx)=true then/*若x是整數,就放到solution*/
solution:append(solution,[[valx,valy]])
)
)$
print(solution);[/color]
[color=red](%o13)[/color] \( [ [-3,-1],[1,-1],[21,5],[1,5],[25,7],[5,7],[25,13],[29,13] ] \)
[color=red](%i14)[/color] [color=blue]load(draw);[/color]
[color=red](%o14)[/color] C:/PROGRA~1/MAXIMA~1.2/share/maxima/5.19.2/share/draw/draw.lisp
[color=green]將圓錐曲線和8個點畫出來[/color]
[color=red](%i15)[/color]
[color=blue]draw2d(xtics =1, /*x軸的間隔為1*/
ytics = 1, /*y軸的間隔為1*/
grid = true,/*顯示格線*/
/*畫出圓錐曲線*/
implicit(%o1=0,x,-5,31,y,-2,15),
point_type = 7,
point_size = 1,
points(solution)/*畫出整數點座標*/
)$[/color]
[img]http://www.permucode.com/maxima/wxm_ll.gif[/img][img]http://www.permucode.com/maxima/wxm_lc.gif[/img][img]http://www.permucode.com/maxima/wxm_lr.gif[/img]
[[i] 本帖最後由 bugmens 於 2013-4-24 05:10 PM 編輯 [/i]] 已知\( x,y,z \)均為實數,且\( 2^x+3^y+5^z=7 \),\( 2^{x-1}+3^y+5^{z+1}=11 \),
若\( t=2^{x+1}+3^y+5^{z-1} \),試求t的範圍。(98高雄市聯招)
感謝站長提供解法 [url=https://math.pro/db/thread-797-1-2.html]https://math.pro/db/thread-797-1-2.html[/url]
[img]http://www.permucode.com/maxima/wxm_ul.gif[/img][img]http://www.permucode.com/maxima/wxm_uc.gif[/img][img]http://www.permucode.com/maxima/wxm_ur.gif[/img]
[color=red](%i1)[/color] [color=blue][2^x+3^y+5^z=7,2^(x-1)+3^y+5^(z+1)=11,2^(x+1)+3^y+5^(z-1)=t];[/color]
[color=red](%o1)[/color] \( [5^z+3^y+2^x=7,5^{z+1}+3^y+2^{x-1}=11,5^{z-1}+3^y+2^{x+1}=t] \)
[color=green]令a=2^x,b=3^y,c=5^z[/color]
[color=red](%i2)[/color] [color=blue]scsimp(%,a=2^x,b=3^y,c=5^z);[/color]
[color=red](%o2)[/color] \( \displaystyle [c+b+a=7,5c+b+\frac{a}{2}=11,\frac{c}{5}+b+2a=t] \)
[color=green]計算a+b+c=7,a/2+b+5c=11的參數解[/color]
[color=red](%i3)[/color] [color=blue]solve([%[1],%[2]],[a,b,c]);[/color]
[color=red](%o3)[/color] \( [ [a=8%r1-8,b=15-9%r1,c=%r1] ] \)
[color=green]a,b,c都是正數[/color]
[color=red](%i4)[/color] [color=blue]map (lambda ([x], rhs(x)>0), %[1]);[/color]
[color=red](%o4)[/color] \( [8%r1-8>0,15-9%r1>0,%r1>0] \)
[color=red](%i5)[/color] [color=blue]load(fourier_elim);[/color]
[color=red](%o5)[/color] C:/PROGRA~1/MAXIMA~1.2/share/maxima/5.19.2/share/contrib/fourier_elim/fourier_elim.lisp
[color=green]從a>0,b>0,c>0解出%r1的範圍[/color]
[color=red](%i6)[/color] [color=blue]fourier_elim(%o4,[%r1]);[/color]
[color=red](%o6)[/color] \( \displaystyle [1<%r1,%r1<\frac{5}{3}] \)
[color=green]將a=8%r1-8,c=15-9%r1,c=%r1代回2a+b+c/5=t[/color]
[color=red](%i7)[/color] [color=blue]ev(%o2[3],%o3[1]);[/color]
[color=red](%o7)[/color] \( \displaystyle 2(8%r1-8)-\frac{44%r1}{5}+15=t \)
[color=green]%r1用t表示[/color]
[color=red](%i8)[/color] [color=blue]solve(%,[%r1]);[/color]
[color=red](%o8)[/color] \( \displaystyle [%r1=\frac{5t+5}{36}] \)
[color=red](%i9)[/color] [color=blue]ev(%o6,%o8[1]);[/color]
[color=red](%o9)[/color] \( \displaystyle [1<\frac{5t+5}{36},\frac{5t+5}{36}<\frac{5}{3}] \)
[color=green]再解出t的範圍[/color]
[color=red](%i10)[/color] [color=blue]fourier_elim(%,[t]);[/color]
[color=red](%o10)[/color] \( \displaystyle [\frac{31}{5}<t,t<11] \)
[img]http://www.permucode.com/maxima/wxm_ll.gif[/img][img]http://www.permucode.com/maxima/wxm_lc.gif[/img][img]http://www.permucode.com/maxima/wxm_lr.gif[/img]
[[i] 本帖最後由 bugmens 於 2009-12-3 10:21 PM 編輯 [/i]] 給定坐標平面上的一錐線C:\( 5x^2-6xy+5y^2-16=0 \)。
(1)若直線L:\( x=3+\alpha t \),\( y=1+\beta t \)(\( t \in R \))與錐線C相切,試求斜率\( \displaystyle \frac{\beta}{\alpha} \)的所有可能值。(10分)
(2)若過點\( T(u,v) \)有一對垂直線與錐線C都相切,試證:\( u^2+v^2-10=0 \)。(10分)
(95台灣師大在職專班)
以下是第1小題
[img]http://www.permucode.com/maxima/wxm_ul.gif[/img][img]http://www.permucode.com/maxima/wxm_uc.gif[/img][img]http://www.permucode.com/maxima/wxm_ur.gif[/img]
[color=red](%i1)[/color] [color=blue]5*x^2-6*x*y+5*y^2-16;[/color]
[color=red](%o1)[/color] \( 5y^2-6xy+5x^2-16 \)
[color=green]將x=3+αt,y=1+βt代入錐線C[/color]
[color=red](%i2)[/color] [color=blue]ev(%,[x=3+%alpha*t,y=1+%beta*t]);[/color]
[color=red](%o2)[/color] \( 5(\beta t+1)^2-6(\alpha t+3)(\beta t+1)+5(\alpha t+3)^2-16 \)
[color=green]展開後重新整理成t的方程式[/color]
[color=red](%i3)[/color] [color=blue]collectterms(expand(%),t);[/color]
[color=red](%o3)[/color] \( (5 \beta^2-6 \alpha \beta+5 \alpha^2)t^2+(24 \alpha-8 \beta)t+16 \)
[color=green]取出各項的係數[/color]
[color=red](%i4)[/color]
[color=blue]a:coeff(%o3,t,2);
b:coeff(%o3,t,1);
c:coeff(%o3,t,0);[/color]
[color=red](%o4)[/color] \( 5\beta^2-6\alpha \beta+5 \alpha^2 \)
[color=red](%o5)[/color] \( 24\alpha-8 \beta \)
[color=red](%o6)[/color] \( 16 \)
[color=green]因為直線L和錐線C相切,故判別式為0[/color]
[color=red](%i7)[/color] [color=blue]b^2-4*a*c=0;expand(%);[/color]
[color=red](%o7)[/color] \( (24 \alpha-8 \beta)^2-64(5 \beta^2-6 \alpha \beta+5 \alpha^2)=0 \)
[color=red](%o8)[/color] \( 256\alpha^2-256 \beta^2=0 \)
[color=green]得到的兩個答案[/color]
[color=red](%i9)[/color] [color=blue]solve(%,%beta); %/%alpha;[/color]
[color=red](%o9)[/color] \( [\beta=-\alpha,\beta=\alpha] \)
[color=red](%o10)[/color] \( \displaystyle [\frac{\beta}{\alpha}=-1,\frac{\beta}{\alpha}=1] \)
[img]http://www.permucode.com/maxima/wxm_ll.gif[/img][img]http://www.permucode.com/maxima/wxm_lc.gif[/img][img]http://www.permucode.com/maxima/wxm_lr.gif[/img]
第2小題
[img]http://www.permucode.com/maxima/wxm_ul.gif[/img][img]http://www.permucode.com/maxima/wxm_uc.gif[/img][img]http://www.permucode.com/maxima/wxm_ur.gif[/img]
[color=red](%i1)[/color] [color=blue]5*x^2-6*x*y+5*y^2-16;[/color]
[color=red](%o1)[/color] \( 5y^2-6xy+5x^2-16 \)
[color=green]假設切線為y=mx+k,代入錐線C[/color]
[color=red](%i2)[/color] [color=blue]y=m*x+k; ev(%o1,%);[/color]
[color=red](%o2)[/color] \( y=mx+k \)
[color=red](%o3)[/color] \( 5(mx+k)^2+5x^2-6x(mx+k)-16 \)
[color=green]展開後重新整理成x的方程式[/color]
[color=red](%i4)[/color] [color=blue]collectterms(expand(%),x);[/color]
[color=red](%o4)[/color] \( (5m^2-6m+5)x^2+(10km-6k)x+5k^2-16 \)
[color=green]取出各項係數[/color]
[color=red](%i4)[/color]
[color=blue]a:coeff(%o4,x,2);
b:coeff(%o4,x,1);
c:coeff(%o4,x,0);[/color]
[color=red](%o5)[/color] \( 5m^2-6m+5 \)
[color=red](%o6)[/color] \( 10km-6k \)
[color=red](%o7)[/color] \( 5k^2-16 \)
[color=green]因為這對垂直線和錐線C相切,故判別式為0[/color]
[color=red](%i8)[/color] [color=blue]b^2-4*a*c; expand(%);[/color]
[color=red](%o8)[/color] \( (10km-6k)^2-4(5k^2-16)(5m^2-6m+5) \)
[color=red](%o9)[/color] \( 320m^2-384m-64k^2+320 \)
[color=green]又因為兩切線垂直,從根與係數的關係可知c/a=-1[/color]
[color=red](%i10)[/color] [color=blue]coeff(%o9,m,0)/coeff(%o9,m,2)=-1;[/color]
[color=red](%o10)[/color] \( \displaystyle \frac{320-64k^2}{320}=-1 \)
[color=green]解出k,得到兩切線[/color]
[color=red](%i11)[/color] [color=blue]solve(%,[k]); map(lambda([t],ev(%o2,t)),%);[/color]
[color=red](%o11)[/color] \( [k=-\sqrt{10},k=\sqrt{10}] \)
[color=red](%o12)[/color] \( [y=mx-\sqrt{10},y=mx+\sqrt{10}] \)
[color=green]T(u,v)在兩切線上,代入直線方程式[/color]
[color=red](%i13)[/color] [color=blue]ev(%,[x=u,y=v]);[/color]
[color=red](%o13)[/color] \( [v=mu-\sqrt{10},v=mu+\sqrt{10}] \)
[color=green]又兩切線互相垂直,故斜率相乘為-1[/color]
[color=red](%i14)[/color] [color=blue]
map(lambda([t],solve(t,[m])),%);
rhs(%[1][1])*rhs(%[2][1])=-1;[/color]
[color=red](%o14)[/color] \( \displaystyle [ [m=\frac{v+\sqrt{10}}{u}],[m=\frac{v-\sqrt{10}}{u}] ] \)
[color=red](%o15)[/color] \( \displaystyle \frac{(v-\sqrt{10})(v+\sqrt{10})}{u^2}=-1 \)
[color=green]化簡後得到答案[/color]
[color=red](%i16)[/color] [color=blue]ratsimp(%*u^2+u^2);[/color]
[color=red](%o16)[/color] \( v^2+u^2-10=0 \)
[img]http://www.permucode.com/maxima/wxm_ll.gif[/img][img]http://www.permucode.com/maxima/wxm_lc.gif[/img][img]http://www.permucode.com/maxima/wxm_lr.gif[/img]
[[i] 本帖最後由 bugmens 於 2010-1-28 12:14 AM 編輯 [/i]] 求\( x^2+2y^2=4 \)與\( y^2=4\sqrt{2}x \)的公切線方程式?
[url=https://math.pro/db/thread-903-1-1.html]https://math.pro/db/thread-903-1-1.html[/url]
[img]http://www.permucode.com/maxima/wxm_ul.gif[/img][img]http://www.permucode.com/maxima/wxm_uc.gif[/img][img]http://www.permucode.com/maxima/wxm_ur.gif[/img]
[color=green]假設切線為y=mx+b[/color]
[color=red](%i1)[/color] [color=blue]y=m*x+b;[/color]
[color=red](%o1)[/color] \( y=mx+b \)
[color=green]將y=mx+b代入x^2+2y^2=4[/color]
[color=red](%i2)[/color] [color=blue]ev(x^2+2*y^2-4,%o1);[/color]
[color=red](%o2)[/color] \( 2(mx+b)^2+x^2-4 \)
[color=green]展開後重新整理成x的方程式[/color]
[color=red](%i3)[/color] [color=blue]collectterms(expand(%),x);[/color]
[color=red](%o3)[/color] \( (2m^2+1)x^2+4bmx+2b^2-4 \)
[color=green]因為直線和橢圓相切,故判別式為0[/color]
[color=red](%i4)[/color] [color=blue]poly_discriminant(%,x)=0;[/color]
[color=red](%o4)[/color] \( 32m^2-8b^2+16=0 \)
[color=green]將y=mx+b代入y^2=4√2x[/color]
[color=red](%i5)[/color] [color=blue]ev(y^2-4*sqrt(2)*x,%o1);[/color]
[color=red](%o5)[/color] \( (mx+b)^2-2^{5/2}x \)
[color=green]展開後重新整理成x的方程式[/color]
[color=red](%i6)[/color] [color=blue]collectterms(expand(%),x);[/color]
[color=red](%o6)[/color] \( m^2x^2+(2bm-2^{5/2})x+b^2 \)
[color=green]因為直線和拋物線相切,故判別式為0[/color]
[color=red](%i7)[/color] [color=blue]poly_discriminant(%,x)=0;[/color]
[color=red](%o7)[/color] \( 32-2^{9/2}bm=0 \)
[color=green]
從(%o4) 32m^2-8b^2+16=0
(%o7) 32-2^(9/2)*bm=0
解出m,b[/color]
[color=red](%i8)[/color] [color=blue]solve([%o4,%o7],[m,b]);[/color]
[color=red](%o8)[/color] \( \displaystyle [ [m=-\frac{1}{\sqrt{2}},b=-2],[m=\frac{1}{\sqrt{2}},b=2],[m=-%i,b=\sqrt{2}%i],[m=%i,b=-\sqrt{2}%i] ] \)
[color=green]得到兩條切線方程式[/color]
[color=red](%i9)[/color] [color=blue]
ev(%o1,%o8[1]);
ev(%o1,%o8[2]);[/color]
[color=red](%o9)[/color] \( \displaystyle y=-\frac{x}{\sqrt{2}}-2 \)
[color=red](%o10)[/color] \( \displaystyle y=\frac{x}{\sqrt{2}}+2 \)
[img]http://www.permucode.com/maxima/wxm_ll.gif[/img][img]http://www.permucode.com/maxima/wxm_lc.gif[/img][img]http://www.permucode.com/maxima/wxm_lr.gif[/img]
[[i] 本帖最後由 bugmens 於 2010-2-10 12:30 PM 編輯 [/i]] 求\( 5x^2-6xy+5y^2-4x-4y+5 \)的最小值,此時x=?,y=?
[img]http://www.permucode.com/maxima/wxm_ul.gif[/img][img]http://www.permucode.com/maxima/wxm_uc.gif[/img][img]http://www.permucode.com/maxima/wxm_ur.gif[/img]
[color=green]maxima沒有內建的配方法指令
參考Barton Willis所寫的配方法
h ttp://www.math.utexas.edu/pipermail/maxima/2007/008787.html[/color] (連結已失效)
[color=red](%i1)[/color] [color=blue]
sfactor(p,x) := block([n, cf, s, d],
p : expand(p),
n : hipow(p,x),
if oddp(n) or n = 0 then p else (
cf : coeff(p,x,n),
s : x^(n/2),
d : expand(cf * s^2 - p),
while hipow(d,x) > 0 do (
d : expand(first(divide(cf * s^2 - p, 2 * cf * s))),
s : s - d),
cf * s^2 + sfactor(p - cf * s^2,x)))$[/color]
[color=red](%i2)[/color] [color=blue]5*x^2-6*x*y+5*y^2-4*x-4*y+5[/color]
[color=red](%o2)[/color] \( 5y^2-6xy-4y+5x^2-4x+5 \)
[color=green]先對y配方法[/color]
[color=red](%i3)[/color] [color=blue]sfactor(%,y);[/color]
[color=red](%o3)[/color] \( \displaystyle 5(y-\frac{3x}{5}-\frac{2}{5})^2+\frac{16x^2}{5}-\frac{32x}{5}+\frac{21}{5} \)
[color=green]再對x配方法[/color]
[color=red](%i4)[/color] [color=blue]part(%,1)+sfactor(rest(%,1),x);[/color]
[color=red](%o4)[/color] \( \displaystyle 5(y-\frac{3x}{5}-\frac{2}{5})^2+\frac{16(x-1)^2}{5}+1 \)
[color=green]當y-3x/5-2/5=0,x-1=0時有最小值[/color]
[color=red](%i5)[/color] [color=blue]solve([part(%,1),part(%,2)],[x,y]);[/color]
[color=red](%o5)[/color] \( [ [x=1,y=1] ] \)
[img]http://www.permucode.com/maxima/wxm_ll.gif[/img][img]http://www.permucode.com/maxima/wxm_lc.gif[/img][img]http://www.permucode.com/maxima/wxm_lr.gif[/img]
當x=1,y=1時有最小值1
或者題目太複雜了,改用偏微分解題
Find the minimum value of \( 2x^2+2y^2+5z^2-2xy-4yz-4x-2z+15 \) for real numbers x, y,z.
USA Stanford Mathematics Tournament 2006
[url]http://www.artofproblemsolving.com/Forum/resources.php?c=182&cid=166&year=2006[/url]
[img]http://www.permucode.com/maxima/wxm_ul.gif[/img][img]http://www.permucode.com/maxima/wxm_uc.gif[/img][img]http://www.permucode.com/maxima/wxm_ur.gif[/img]
[color=red](%i1)[/color] [color=blue]2*x^2+2*y^2+5*z^2-2*x*y-4*y*z-4*x-2*z+15;[/color]
[color=red](%o1)[/color] \( 5z^2-4yz-2z+2y^2-2xy+2x^2-4x+15 \)
[color=green]分別對x,y,z偏微分[/color]
[color=red](%i2)[/color] [color=blue]
diff(%o1,x,1)=0;
diff(%o1,y,1)=0;
diff(%o1,z,1)=0;[/color]
[color=red](%o2)[/color] \( -2y+4x-4=0 \)
[color=red](%o3)[/color] \( -4z+4y-2x=0 \)
[color=red](%o4)[/color] \( 10z-4y-2=0 \)
[color=green]解出x,y,z[/color]
[color=red](%i5)[/color] [color=blue]solve([%o2,%o3,%o4],[x,y,z]);[/color]
[color=red](%o5)[/color] \( [ [x=2,y=2,z=1] ] \)
[color=green]x,y,z代回原式得最小值[/color]
[color=red](%i6)[/color] [color=blue]ev(%o1,%o5[1]);[/color]
[color=red](%o6)[/color] \( 10 \)
[img]http://www.permucode.com/maxima/wxm_ll.gif[/img][img]http://www.permucode.com/maxima/wxm_lc.gif[/img][img]http://www.permucode.com/maxima/wxm_lr.gif[/img]
當x=2,y=2,z=1時有最小值10 若\( A=\Bigg[\; \matrix{2 & -2 \cr -3 & 1} \Bigg]\; \),試利用矩陣的對角線化方法求\( A^n \),其中n為自然數。
(99明倫高中,[url=https://math.pro/db/thread-959-1-3.html]https://math.pro/db/thread-959-1-3.html[/url])
若\( A=\Bigg[\; \matrix{1 & 1 \cr 2 & 0} \Bigg]\; \),求\( A^{50} \)。
(99國立清水高中,[url=https://math.pro/db/thread-1017-1-1.html]https://math.pro/db/thread-1017-1-1.html[/url])
[color=green]定義A矩陣[/color]
[color=red](%i1)[/color] [color=blue]A:matrix([2,-2],[-3,1]);[/color]
[color=red](%o1)[/color] \( \Bigg[\; \matrix{2 & -2 \cr -3 & 1} \Bigg]\; \)
[color=green]定義2階單位矩陣[/color]
[color=red](%i2)[/color] [color=blue]I: ident(2);[/color]
[color=red](%o2)[/color] \( \Bigg[\; \matrix{1 & 0 \cr 0 & 1} \Bigg]\; \)
[color=green]解特徵方程式[/color]
[color=red](%i3)[/color] [color=blue]determinant(A-x*I)=0;solve(%,x);[/color]
[color=red](%o3)[/color] \( (1-x)(2-x)-6=0 \)
[color=red](%o4)[/color] \( [\ x=4,x=-1 ]\ \)
[color=green]第一個特徵向量[/color]
[color=red](%i5)[/color] [color=blue]A-rhs(%o4[1])*I;[/color]
[color=red](%o5)[/color] \( \Bigg[\; \matrix{-2 & -2 \cr -3 & -3} \Bigg]\; \)
[color=red](%i6)[/color] [color=blue]transpose(matrix([%o5[1][2],-%o5[1][1]]));[/color]
[color=red](%o6)[/color] \( \Bigg[\; \matrix{-2 \cr 2} \Bigg]\; \)
[color=green]第二個特徵向量[/color]
[color=red](%i7)[/color] [color=blue]A-rhs(%o4[2])*I;[/color]
[color=red](%o7)[/color] \( \Bigg[\; \matrix{3 & -2 \cr -3 & 2} \Bigg]\; \)
[color=red](%i8)[/color] [color=blue]transpose(matrix([%o7[1][2],-%o7[1][1]]));[/color]
[color=red](%o8)[/color] \( \Bigg[\; \matrix{-2 \cr -3} \Bigg]\; \)
[color=green]定義特徵矩陣為P[/color]
[color=red](%i9)[/color] [color=blue]P:addcol(%o6,%o8);[/color]
[color=red](%o9)[/color] \( \Bigg[\; \matrix{-2 & -2 \cr 2 & -3} \Bigg]\; \)
[color=green]P的反矩陣[/color]
[color=red](%i10)[/color] [color=blue]invP:invert(P);[/color]
[color=red](%o9)[/color] \( \displaystyle \Bigg[\; \matrix{-\frac{3}{10} & \frac{1}{5} \cr -\frac{1}{5} & -\frac{1}{5}} \Bigg]\; \)
[color=green]注意:矩陣乘法用.而不是*[/color]
[color=red](%i11)[/color] [color=blue]D:invP.A.P;[/color]
[color=red](%o11)[/color] \( \Bigg[\; \matrix{4 & 0 \cr 0 & -1} \Bigg]\; \)
[color=green]答案[/color]
[color=red](%i12)[/color] [color=blue]P.D^n.invP;[/color]
[color=red](%o12)[/color] \( \displaystyle \left[ \matrix{\displaystyle \frac{3 \cdot 4^n}{5}+\frac{2 \cdot (-1)^n}{5} & \frac{2 \cdot (-1)^n}{5}-\frac{2 \cdot 4^n}{5} \cr \frac{3 \cdot (-1)^n}{5}-\frac{3 \cdot 4^n}{5} & \frac{2 \cdot 4^n}{5}+\frac{3 \cdot (-1)^n}{5}} \right] \)
[color=green]或是載入linearalgebra套件[/color]
[color=red](%i13)[/color] [color=blue]load(linearalgebra);[/color]
[color=red](%o13)[/color] C:/PROGRA~1/MAXIMA~1.1/share/maxima/5.22.1/share/linearalgebra/linearalgebra.mac
[color=green]直接呼叫matrixfun求出答案[/color]
[color=red](%i14)[/color] [color=blue]matrixfun(lambda([x],x^n),A);[/color]
[color=red](%o14)[/color] \( \left[ \matrix{\displaystyle \frac{3 \cdot 4^n+2 \cdot (-1)^n}{5} & -\frac{2 \cdot 4^n-2 \cdot (-1)^n}{5} \cr -\frac{3 \cdot 4^n-3 \cdot (-1)^n}{5} & \frac{2 \cdot 4^n+3 \cdot (-1)^n}{5}} \right] \)
-------------------------
101.11.10補充
\( A=\Bigg[\; \matrix{-1 & -9 \cr 1 & -7} \Bigg]\; \),\( A=PDP^{-1} \),且\( \displaystyle P=\Bigg[\; \matrix{3 & 1 \cr 1 & 0} \Bigg]\; \),求\( A^n= \)?(答案以n表示,\( n \in N \))
(101松山工農,[url]https://math.pro/db/thread-1482-1-3.html[/url])
[color=green]載入linearalgebra.mac才能使用matrixfun指令[/color]
[color=red](%i1)[/color] [color=blue]load("linearalgebra.mac");[/color]
[color=red](%o1)[/color] C:/PROGRA~1/MAXIMA~1.0-2/share/maxima/5.28.0-2/share/linearalgebra/linearalgebra.mac
[color=green]定義A矩陣[/color]
[color=red](%i2)[/color] [color=blue]A:matrix([-1,-9],[1,-7]);[/color]
[color=red](%o2)[/color] \( \displaystyle \Bigg[\; \matrix{-1 & -9 \cr 1 & -7} \Bigg]\; \)
[color=green]定義2階單位矩陣[/color]
[color=red](%i3)[/color] [color=blue]I:ident(2);[/color]
[color=red](%o3)[/color] \( \displaystyle \Bigg[\; \matrix{1 & 0 \cr 0 & 1} \Bigg]\; \)
[color=green]解特徵方程式,但特徵值重根[/color]
[color=red](%i4)[/color] [color=blue]
determinant(A-x*I)=0;
solve(%,x);[/color]
[color=red](%o4)[/color] \( (-x-7)(-x-1)+9=0 \)
[color=red](%o5)[/color] \( [ x=-4 ] \)
[color=green]求第一個特徵向量[/color]
[color=red](%i6)[/color] [color=blue](A-rhs(%o5[1])*I).matrix([x],[y])=matrix([0],[0]);[/color]
[color=red](%o6)[/color] \( \displaystyle \Bigg[\; \matrix{3x-9y \cr x-3y} \Bigg]\;=\Bigg[\; \matrix{0 \cr 0} \Bigg]\; \)
[color=red](%i7)[/color] [color=blue]
lhs(%)[1][1]=rhs(%)[1][1];
solve(%,[x,y]);
ev(%,%r1=1);
ev(matrix([x],[y]),%[1]);[/color]
[color=red](%o7)[/color] \( 3x-9y=0 \)
[color=red](%o8)[/color] \( [ [x=3%r1,y=%r1] ] \)
[color=red](%o9)[/color] \( [ [x=3,y=1] ] \)
[color=red](%o10)[/color] \( \displaystyle \Bigg[\; \matrix{3 \cr 1} \Bigg]\; \)
[color=green]求第二個特徵向量[/color]
[color=red](%i11)[/color] [color=blue](A-rhs(%o5[1])*I).matrix([x],[y])=%;[/color]
[color=red](%o11)[/color] \( \displaystyle \Bigg[\; \matrix{3x-9y \cr x-3y} \Bigg]\;=\Bigg[\; \matrix{3 \cr 1} \Bigg]\; \)
[color=red](%i12)[/color] [color=blue]
lhs(%)[1][1]=rhs(%)[1][1];
solve(%,[x,y]);
ev(%,%r2=0);
ev(matrix([x],[y]),%[1]);[/color]
[color=red](%o12)[/color] \( 3x-9y=3 \)
[color=red](%o13)[/color] \( [ [x=3%r2+1,y=%r2] ] \)
[color=red](%o14)[/color] \( [ [x=1,y=0] ] \)
[color=red](%o15)[/color] \( \displaystyle \Bigg[\; \matrix{1 \cr 0} \Bigg]\; \)
[color=green]兩個特徵向量形成P矩陣[/color]
[color=red](%i16)[/color] [color=blue]P:addcol(%o10,%o15);[/color]
[color=red](%o16)[/color] \( \displaystyle \Bigg[\; \matrix{3 & 1 \cr 1 & 0} \Bigg]\; \)
[color=green]求P的反矩陣[/color]
[color=red](%i17)[/color] [color=blue]inv_P:invert(P);[/color]
[color=red](%o17)[/color] \( \displaystyle \Bigg[\; \matrix{0 & 1 \cr 1 & -3} \Bigg]\; \)
[color=green]D=P^-1.A.P
矩陣乘法用的是.不是*[/color]
[color=red](%i18)[/color] [color=blue]D:inv_P.A.P;[/color]
[color=red](%o18)[/color] \( \displaystyle \Bigg[\; \matrix{-4 & 1 \cr 0 & -4} \Bigg]\; \)
[color=green]計算D的n次方
因為這裡的D矩陣不是對角矩陣,無法直接用D^n計算矩陣n次方,所以改用matrixfun來計算[/color]
[color=red](%i19)[/color] [color=blue]matrixfun(lambda([x],x^n),D);[/color]
[color=red](%o19)[/color] \( \displaystyle \Bigg[\; \matrix{(-4)^n & n(-4)^{n-1} \cr 0 & (-4)^n} \Bigg]\; \)
[color=green]計算A^n=P.D^n.P^-1[/color]
[color=red](%i20)[/color] [color=blue]P.%.inv_P;[/color]
[color=red](%o20)[/color] \( \displaystyle \Bigg[\; \matrix{(-4)^n+3n(-4)^{n-1} & 3((-4)^n-3n(-4)^{n-1})-3(-4)^n \cr n(-4)^{n-1} & (-4)^n-3n(-4)^{n-1}} \Bigg]\; \)
[color=green]A^n簡化後得到答案[/color]
[color=red](%i21)[/color] [color=blue]ratsimp(%);[/color]
[color=red](%o21)[/color] \( \displaystyle \Bigg[\; \matrix{(3n-4)(-4)^{n-1} & -9n(-4)^{n-1} \cr n(-4)^{n-1} & -(3n+4)(-4)^{n-1}} \Bigg]\; \)
[color=green]就和matrixfun所計算A^n的結果相同[/color]
[color=red](%i22)[/color] [color=blue]matrixfun(lambda([x],x^n),A);[/color]
[color=red](%o22)[/color] \( \displaystyle \Bigg[\; \matrix{(3n-4)(-4)^{n-1} & -9n(-4)^{n-1} \cr n(-4)^{n-1} & -(3n+4)(-4)^{n-1}} \Bigg]\; \)
參考資料
7.THE JORDAN CANONICAL FORM
[url]https://math.pro/db/attachment.php?aid=2525&k=8acfa7981df7bf97a29097819bc78e87&t=1407797768[/url]
利用diag.mac所提供的指令來計算矩陣n次方
[color=green]要載入diag.mac才能使用jordan,ModeMatrix,dispJordan指令[/color]
[color=red](%i1)[/color] [color=blue]load("diag.mac");[/color]
[color=red](%o1)[/color] C:/PROGRA~1/MAXIMA~1.0-2/share/maxima/5.28.0-2/share/contrib/diag.mac
[color=green]定義A矩陣[/color]
[color=red](%i2)[/color] [color=blue]A:matrix([-1,-9],[1,-7]);[/color]
[color=red](%o2)[/color] \( \displaystyle \Bigg[\; \matrix{-1 & -9 \cr 1 & -7} \Bigg]\; \)
[color=green]計算A的特徵根-4,代數重數2(重根)[/color]
[color=red](%i3)[/color] [color=blue]EigenValue:jordan(A);[/color]
[color=red](%o3)[/color] \( [ [-4,2] ] \)
[color=green]求得P矩陣[/color]
[color=red](%i4)[/color] [color=blue]P:ModeMatrix(A,EigenValue);[/color]
[color=red](%o4)[/color] \( \displaystyle \Bigg[\; \matrix{3 & 1 \cr 1 & 0} \Bigg]\; \)
[color=green]P的反矩陣[/color]
[color=red](%i5)[/color] [color=blue]inv_P:invert(P);[/color]
[color=red](%o5)[/color] \( \displaystyle \Bigg[\; \matrix{0 & 1 \cr 1 & -3} \Bigg]\; \)
[color=green]求得D矩陣[/color]
[color=red](%i6)[/color] [color=blue]D:dispJordan(EigenValue);[/color]
[color=red](%o6)[/color] \( \displaystyle \Bigg[\; \matrix{-4 & 1 \cr 0 & -4} \Bigg]\; \)
[color=green]計算D的n次方[/color]
[color=red](%i7)[/color] [color=blue]matrixfun(lambda([x],x^n),D);[/color]
[color=red](%o7)[/color] \( \displaystyle \Bigg[\; \matrix{(-4)^n & n(-4)^{n-1} \cr 0 & (-4)^n} \Bigg]\; \)
[color=green]計算A^n=P.D^n.P^-1[/color]
[color=red](%i8)[/color] [color=blue]P.%.inv_P;[/color]
[color=red](%o8)[/color] \( \displaystyle \Bigg[\; \matrix{(-4)^n+3n(-4)^{n-1} & 3((-4)^n-3n(-4)^{n-1})-3(-4)^n \cr n(-4)^{n-1} & (-4)^n-3n(-4)^{n-1}} \Bigg]\; \)
[color=green]A^n簡化後得到答案[/color]
[color=red](%i9)[/color] [color=blue]ratsimp(%);[/color]
[color=red](%o9)[/color] \( \Bigg[\; \matrix{\displaystyle (3n-4)(-4)^{n-1} & -9n(-4)^{n-1} \cr n(-4)^{n-1} & -(3n+4)(-4)^{n-1}} \Bigg]\; \)
我另外找了兩題也是特徵根相同的題目讓各位練習,因為特徵根是1所以會比較簡單
\( A=\displaystyle \Bigg[\; \matrix{-1 & 4 \cr -1 & 3} \Bigg]\; \),則\( A^n= \)[u] [/u]?
[答案]
\( \displaystyle P=\Bigg[\; \matrix{-2 & 1 \cr -1 & 0} \Bigg]\; \),\( \displaystyle P^{-1}=\Bigg[\; \matrix{0 & -1 \cr 1 & -2} \Bigg]\; \)
\( \displaystyle D=\Bigg[\; \matrix{1 & 1 \cr 0 & 1} \Bigg]\; \),\( \displaystyle D^n=\Bigg[\; \matrix{1 & n \cr 0 & 1} \Bigg]\; \)
\( \displaystyle A^n=P.D^n.P^{-1}=\Bigg[\; \matrix{1-2n & 4n \cr -n & 2n+1} \Bigg]\; \)
\( A=\displaystyle \Bigg[\; \matrix{4 & -9 \cr 1 & -2} \Bigg]\; \),則\( A^n= \)[u] [/u]?
[答案]
\( \displaystyle P=\Bigg[\; \matrix{3 & 1 \cr 1 & 0} \Bigg]\; \),\( \displaystyle P^{-1}=\Bigg[\; \matrix{0 & 1 \cr 1 & -3} \Bigg]\; \)
\( \displaystyle D=\Bigg[\; \matrix{1 & 1 \cr 0 & 1} \Bigg]\; \),\( \displaystyle D^n=\Bigg[\; \matrix{1 & n \cr 0 & 1} \Bigg]\; \)
\( \displaystyle A^n=P.D^n.P^{-1}=\Bigg[\; \matrix{3n+1 & -9n \cr n & 1-3n} \Bigg]\; \)
111.7.7補充
設矩陣\(A=\left(\matrix{0&-1 \cr 1&2}\right)\),若\(A^{111}=\left(\matrix{a&b \cr c&d}\right)\),則\(a+c+d=\)?
(A)110 (B)111 (C)112 (D)113
(111台中市國中聯招,[url]https://math.pro/db/thread-3661-1-1.html[/url])
103.8.11補充
設\( I=\left[ \matrix{1 & 0 \cr 0 & 1} \right] \),\( N=\left[ \matrix{1 & 1 \cr -1 & -1} \right] \),求\( (2I-N)^{103}= \)?
(103南大附中,[url]https://math.pro/db/viewthread.php?tid=1942&page=4#pid11839[/url])
有完整的計算式子 2009用2個或2個以上連續的整數表示,有幾種表示法?
[url=https://math.pro/db/thread-827-1-1.html]https://math.pro/db/thread-827-1-1.html[/url]
[color=green]從m開始加n個數總和為2009[/color]
[color=red](%i1)[/color] [color=blue]sum(m+(k-1)*1,k,1,n)=2009;[/color]
[color=red](%o1)[/color] \( \displaystyle \sum_{k=1}^{n}m+k-1=2009 \)
[color=green]載入simplify_sum套件,計算出總和[/color]
[color=red](%i2)[/color] [color=blue]load("simplify_sum");[/color]
[color=red](%o2)[/color] C:/PROGRA~1/MAXIMA~1.1/share/maxima/5.22.1/share/contrib/solve_rec/simplify_sum.mac
[color=red](%i3)[/color] [color=blue]simplify_sum(%o1);[/color]
[color=red](%o3)[/color] \( \displaystyle \frac{n^2+n}{2}+mn-n=2009 \)
[color=red](%i4)[/color] [color=blue]ratsimp(%*2);[/color]
[color=red](%o4)[/color] \( n^2+(2m-1)n=4018 \)
[color=red](%i5)[/color] [color=blue]facout(n,lhs(%))=rhs(%);[/color]
[color=red](%o5)[/color] \( n(n+2m-1)=4018 \)
[color=green]考慮4018的因數分解[/color]
[color=red](%i6)[/color] [color=blue]d:divisors(rhs(%));[/color]
[color=red](%o6)[/color] {1,2,7,14,41,49,82,98,287,574,2009,4018}
[color=green]計算出首項和項數[/color]
[color=red](%i7)[/color] [color=blue]
for divisor in d do
(fx:ev(%o5,n=divisor),
solution:solve(fx,[m]),
if integerp(rhs(solution[1]))=true then
print("(",rhs(solution[1]),",",divisor,")")
);[/color]
[color=red](%o7)[/color]
(2009,1)
(1004,2)
(284,7)
(137,14)
(29,41)
(17,49)
(-16,82)
(-28,98)
(-136,287)
(-283,574)
(-1003,2009)
(-2008,4018)
[color=green]扣除n=1不合的情況,共有11種方法[/color]
[[i] 本帖最後由 bugmens 於 2014-8-12 07:02 AM 編輯 [/i]]