43 12345
發新話題
打印

用Maxima解題


數學圖形素描教室:用旋轉曲面、多面體、拓樸形狀來創作!結合數學與美學的全新領域
数学デッサン教室 描いて楽しむ数学のかたち
作者: 瑞慶山 香佳
譯者: 陳朕疆
出版社:台灣東販
出版日期:2019/10/28

節錄書中蘋果曲面參數式

◎蘋果曲面的製作方法
  該怎麼建構出蘋果曲面呢?讓我們來看看製作方法吧。
①建構出一個環面。
\(\cases{x=(4+cos u)cos v \cr y=(4+cos u)sin v \cr z=5 sin u},-\pi \le u \le \pi,0 \le v \le 2 \pi\)
②調整成接近角狀環面的形狀。
\(\cases{x=(4+3.8cos u)cos v \cr y=(4+3.8 cos u)sin v \cr z=5sin u},-\pi \le u \le \pi,0\le v \le 2 \pi\)
③調整成上方較胖,下方較瘦的形狀。
\(\cases{x=(4+3.8 cos u)cos v \cr y=(4+3.8 cos u)sin v \cr z=5sin u+2 cos u},-\pi \le u \le \pi,0\le v \le 2\pi\)
④建構出蘋果的芯。
\(\cases{x=(4+3.8 cos u)cos v \cr y=(4+3.8 cos u)sin v \cr z=-5log_{10}(1-0.315u)+5sin u+2 cos u},-\pi \le u \le \pi,0\le v \le 2\pi\)



以前要先載入draw.lisp才能使用draw3d指令
但現在draw3d已經是maxima內建指令不再需要先載入draw.lisp

(%i1) load("draw");
(%o1) C:/maxima-5.43.0/share/maxima/5.43.0/share/draw/draw.lisp

以vtk當作渲染器
(%i2) draw_renderer: 'vtk;
(%o2) vtk

①建構出一個環面
(%i6)
x: (4+cos(u))*cos(v);
y: (4+cos(u))*sin(v);
z:5*sin(u);
draw3d(enhanced3d=true,
              parametric_surface(x,y,z,u,-%pi,%pi,v,0,2*%pi));

(x) \((cos(u)+4)cos(v)\)
(y) \((cos(u)+4)sin(v)\)
(z) \(5sin(u)\)
(%o6) done


②調整成接近角狀環面的形狀
(%i10)
x: (4+3.8*cos(u))*cos(v);
y: (4+3.8*cos(u))*sin(v);
z:5*sin(u);
draw3d(enhanced3d=true,
              parametric_surface(x,y,z,u,-%pi,%pi,v,0,2*%pi));

(x) \((3.8cos(u)+4)cos(v)\)
(y) \((3.8cos(u)+4)sin(v)\)
(z) \(5sin(u)\)
(%o10) done


③調整成上方較胖,下方較瘦的形狀
(%i14)
x: (4+3.8*cos(u))*cos(v);
y: (4+3.8*cos(u))*sin(v);
z:5*sin(u)+2*cos(u);
draw3d(enhanced3d=true,
              parametric_surface(x,y,z,u,-%pi,%pi,v,0,2*%pi));

(x) \((3.8cos(u)+4)cos(v)\)
(y) \((3.8cos(u)+4)sin(v)\)
(z) \(5sin(u)+2cos(u)\)
(%o14) done


④建構出蘋果的芯
(%i18)
x: (4+3.8*cos(u))*cos(v);
y: (4+3.8*cos(u))*sin(v);
z:-5*log(1-0.315*u)/log(10)+5*sin(u)+2*cos(u);
draw3d(enhanced3d=true,
              parametric_surface(x,y,z,u,-%pi,%pi,v,0,2*%pi));

(x) \((3.8cos(u)+4)cos(v)\)
(y) \((3.8cos(u)+4)sin(v)\)
(z) \(\displaystyle 5sin(u)+2cos(u)-\frac{5log(1-0.315u)}{log(10)}\)
(%o18) done

TOP

要先載入trigtools.mac才能使用atan_contract指令
(%i1) load(trigtools);
; file: C:/maxima-5.48.1/share/maxima/5.48.1/share/contrib/Grobner/grobner.lisp
; in: DEFUN POLY-ADD-VARIABLES
;     (DEFUN MAXIMA:: POLY-ADD-VARIABLES (MAXIMA:: P MAXIMA::K)
;       (DECLARE (VALUES MAXIMA:: POLY &OPTIONAL))
;       (SETF (MAXIMA:: POLY-TERMLIST MAXIMA:: P)
;               (MAXIMA::TERMLIST-ADD-VARIABLES (MAXIMA:: POLY-TERMLIST MAXIMA:: P)
;                                               MAXIMA::K))
;       MAXIMA:: P)
;
; caught WARNING:
;   Derived type of (MAXIMA:: P) is
;     (VALUES MAXIMA:: POLY &OPTIONAL),
;   conflicting with the declared function return type
;     (VALUES &OPTIONAL LIST &REST T).
;   See also:
;     The SBCL Manual, Node "Handling of Types"
;
; compilation unit finished
;   caught 1 WARNING condition
(%o1) C:/maxima-5.48.1/share/maxima/5.48.1/share/contrib/trigtools/trigtools.mac

以atan_contract指令直接計算
求\(\displaystyle tan^{-1}\frac{1}{3}+tan^{-1}\frac{1}{5}+tan^{-1}\frac{1}{7}+tan^{-1}\frac{1}{8}\)之值為何?
(99大安高工,https://math.pro/db/viewthread.php?tid=960&page=1#pid2178)

(%i2) atan_contract(atan(1/3)+atan(1/5)+atan(1/7)+atan(1/8));
(%o2) \(\displaystyle \frac{\pi}{4}\)

以atan_contract指令直接計算
Find the value of \( 10 cot(cot^{-1}3+cot^{-1}7+cot^{-1}13+cot^{-1}21) \).
(1984AIME,https://artofproblemsolving.com/ ... Problems/Problem_13)

(%i3) atan_contract(acot(3)+acot(7)+acot(13)+acot(21));
(%o3) \(\displaystyle atan\left(\frac{2}{3}\right)\)

相加的結果再求10cot()得到答案
(%i4) 10*cot(%);
(%o4) \(15\)

以atan_contract指令直接計算
試求正整數n使得下式成立\( \displaystyle tan^{-1} \frac{1}{3}+tan^{-1} \frac{1}{4}+tan^{-1} \frac{1}{5}+tan^{-1} \frac{1}{n}=\frac{\pi}{4} \)。
(2008AIME,https://artofproblemsolving.com/ ... 008_AIME_I_Problems)
(99東山高中,https://math.pro/db/thread-941-1-1.html)
(%i5) atan(1/n)=atan_contract(%pi/4-(atan(1/3)+atan(1/4)+atan(1/5)));
(%o5) \(\displaystyle atan\left(\frac{1}{n}\right)=atan\left(\frac{1}{47}\right)\)

解出答案\(n\)
(%i6) solve(%,n);
(%o6) \([n=47]\)

atan_add副程式顯示\(\displaystyle atan(x)+atan(y)=atan\left(\frac{x+y}{1-xy}\right)\)計算過程
(%i7)
atan_add(atan1,atan2):=block([x:tan(atan1),y:tan(atan2)],
    print(atan1,"+",atan2,"=atan(",sconcat(x,"+",y)/sconcat(1,"-",x,"*",y),")=",atan_contract(atan1+atan2)))$


\(\displaystyle tan^{-1}\frac{1}{3}+tan^{-1}\frac{1}{5}+tan^{-1}\frac{1}{7}+tan^{-1}\frac{1}{8}\)的計算過程
(%i8) lreduce(atan_add,[atan(1/3), atan(1/5), atan(1/7), atan(1/8)]);
 \(\displaystyle atan\left(\frac{1}{3}\right)+atan\left(\frac{1}{5}\right)=atan\left(\frac{1/3+1/5}{1-1/3*1/5}\right)=atan\left(\frac{4}{7}\right)\)
 \(\displaystyle atan\left(\frac{4}{7}\right)+atan\left(\frac{1}{7}\right)=atan\left(\frac{4/7+1/7}{1-4/7*1/7}\right)=atan\left(\frac{7}{9}\right)\)
 \(\displaystyle atan\left(\frac{7}{9}\right)+atan\left(\frac{1}{8}\right)=atan\left(\frac{7/9+1/8}{1-7/9*1/8}\right)=\frac{\pi}{4}\)
(%o8) \(\displaystyle \frac{\pi}{4}\)

\( 10 cot(cot^{-1}3+cot^{-1}7+cot^{-1}13+cot^{-1}21) \)的計算過程
(%i9) lreduce(atan_add,[acot(3),acot(7),acot(13),acot(21)]);
 \(\displaystyle acot(3)+acot(7)=atan(\frac{1/3+1/7}{1-1/3*1/7})=atan\left(\frac{1}{2}\right)\)
 \(\displaystyle atan\left(\frac{1}{2}\right)+acot(13)=atan\left(\frac{1/2+1/13}{1-1/2*1/13}\right)=atan\left(\frac{3}{5}\right)\)
 \(\displaystyle atan\left(\frac{3}{5}\right)+acot(21)=atan\left(\frac{3/5+1/21}{1-3/5*1/21}\right)=atan\left(\frac{2}{3}\right)\)
(%o9) \(\displaystyle atan\left(\frac{2}{3}\right)\)

相加的結果再求10cot()得到答案
(%i10) 10*cot(%);
(%o10) \(15\)

\( \displaystyle tan^{-1} \frac{1}{3}+tan^{-1} \frac{1}{4}+tan^{-1} \frac{1}{5}+tan^{-1} \frac{1}{n}=\frac{\pi}{4} \)的計算過程
(%i11) sum:lreduce(atan_add,[atan(1/3), atan(1/4), atan(1/5), atan(1/n)]);
 \(\displaystyle atan\left(\frac{1}{3}\right)+atan\left(\frac{1}{4}\right)=atan\left(\frac{1/3+1/4}{1-1/3*1/4}\right)=atan\left(\frac{7}{11}\right)\)
 \(\displaystyle atan\left(\frac{7}{11}\right)+atan\left(\frac{1}{5}\right)=atan\left(\frac{7/11+1/5}{1-7/11*1/5}\right)=atan\left(\frac{23}{24}\right)\)
 \(\displaystyle atan\left(\frac{23}{24}\right)+atan\left(\frac{1}{n}\right)=atan\left(\frac{23/24+1/n}{1-23/24*1/n}\right)=atan\left(\frac{1}{n}\right)+atan\left(\frac{23}{24}\right)\)
(%o11) \(\displaystyle atan\left(\frac{1}{n}\right)+atan\left(\frac{23}{24}\right)\)

解出答案\(n\)
(%i12) solve(sum=%pi/4, n);
(%o12) \( \left[n=-\left(\frac{1}{tan\left(atan\left(\displaystyle \frac{23}{24}\right)\displaystyle-\frac{\pi}{4}\right)}\right)\right]\)

用trigexpand化簡答案\(n\)
(%i13) trigexpand(%);
(%o13) \([n=47]\)

\( \displaystyle tan^{-1} \frac{1}{3}+tan^{-1} \frac{1}{4}+tan^{-1} \frac{1}{5}+tan^{-1} \frac{1}{n}=\frac{\pi}{4} \)的計算過程
(%i14) sum=%pi/4;
(%o14) \(\displaystyle atan\left(\frac{1}{n}\right)+atan\left(\frac{23}{24}\right)=\frac{\pi}{4}\)

移項
(%i15) %-part(%,1,2);
(%o15) \(\displaystyle atan\left(\frac{1}{n}\right)=\frac{\pi}{4}-atan\left(\frac{23}{24}\right)\)

\(\displaystyle \frac{\pi}{4}-atan\left(\frac{23}{24}\right)\)的計算過程
(%i16) lhs(%)=atan_add(%pi/4,-atan(23/24));
 \(\displaystyle \frac{\pi}{4}+-atan\left(\frac{23}{24}\right)=atan\left(\frac{1+-(23/24)}{1-1*-(23/24)}\right)=atan\left(\frac{1}{47}\right)\)
(%o16) \(\displaystyle atan\left(\frac{1}{n}\right)=atan\left(\frac{1}{47}\right)\)

解出答案\(n\)
(%i17) solve(%,n);
(%o17) \([n=47]\)

TOP

求兩曲線\(y=x^3-3x+1,y=x^3-3x+33\)的公切線方程式?
(109高雄市高中聯招,https://math.pro/db/thread-3338-1-1.html)

坐標平面上,設\(\Gamma_1\)為拋物線\(y=x^2\),\(\Gamma_2\)是將\(\Gamma_1\)往右平移2單位,再向上平移4單位所得的拋物線,試求
(1)已知直線\(L\)與\(\Gamma_1\),\(\Gamma_2\)都相切,求\(L\)的方程式。
(2)求經由\((1)\)所求出的直線\(L\)與\(\Gamma_1\),\(\Gamma_2\)所圍成的區域面積。
(115明倫高中,https://math.pro/db/thread-4095-1-1.html)

若有兩曲線\(\Gamma_1\):\(\displaystyle y=e^{-x}\)及\(\Gamma_2\):\(\displaystyle y=-e^{x+1}\),試求:
(1)兩曲線的公切線\(L\)的方程式。
(2)直線\(L\)與\(\Gamma_1,\Gamma_2\)的切點座標。
(115永春高中,https://math.pro/db/thread-4084-1-1.html)

今將函數\(\Gamma\):\(y=x^3+x\)向上平移\(k\)單位成新函數\(\Gamma_1\)。若\(\Gamma\)與\(\Gamma_1\)之公切線斜率大於\(\displaystyle\frac{7}{4}\),則\(k\)的範圍為   
(115宜蘭高中,https://math.pro/db/thread-4096-1-1.html)


要先載入solve_rat_ineq.mac才能使用solve_rat_ineq指令
(%i1) load(solve_rat_ineq);
(%o1) C:/maxima-5.49.0/share/maxima/5.49.0/share/solve_rat_ineq/solve_rat_ineq.mac

求y=f(x)和y=g(x)公切線副程式
(%i2)
CommonTangent(fx,gx):=block(
    [ya,yb,ma,mb,Tangenta,Tangentb,equation1,equation2,solutions,step1_sols,sol_a_list,sa,sb,step1_sols_a,step2_eq,sol_b_list,tangent],
    print("設",fx,"切點(a,",ya:ev(rhs(fx),x=a),"),切線斜率ma=",ma:ev(diff(rhs(fx),x,1),x=a)),
    print("切線方程式y=",Tangenta:ma*(x-a)+ya,",化簡y=",Tangenta:collectterms(expand(Tangenta),x,1)),
    print("設",gx,"切點(b,",yb:ev(rhs(gx),x=b),"),切線斜率mb=",mb:ev(diff(rhs(gx),x,1),x=b)),
    print("切線方程式y=",Tangentb:mb*(x-b)+yb,",化簡y=",Tangentb:collectterms(expand(Tangentb),x,1)),
   
    equation1:coeff(Tangenta,x,1)=coeff(Tangentb,x,1), /*切線方程式的x係數相等*/
    equation2:coeff(Tangenta,x,0)=coeff(Tangentb,x,0), /*切線方程式的常數項係數相等*/
    print("切線方程式比較係數",matrix([equation1],[equation2]),
        ",移項",matrix([equation1:lhs(equation1)-rhs(equation1)=0],
                       [equation2:lhs(equation2)-rhs(equation2)=0]),
        ",同除",matrix([content(lhs(equation1))[2]=0],[content(lhs(equation2))[2]=0])),
        
    print("利用代入消去法求解"),
    solutions:[],
    /* 步驟 1:嘗試從第一式解出 b */
    step1_sols: solve(equation1,b),
    if length(step1_sols)>0 then
        (for s1 in step1_sols do
            (print("由第一式解出",s1),
            /* 步驟 2:將 b 的關係式代入第二式,並強制化簡 */
            print("代入第二式化簡得",step2_eq:radcan(subst(s1,equation2))),
            /* 步驟 3:對乾淨的第二式解出 a */
            sol_a_list:solve(step2_eq,a),
            for sa in sol_a_list do
               (/* 步驟 4:將求得的 a 代回 s1 求出 b */
                sb:radcan(ev(s1,sa)),
                /* 將解打包成與 solve 相同的雙層串列格式,如 [[a=-3/2, b=1/2]] */
                solutions:append(solutions,[[sa,sb]])
               )
           )
       )
    elseif length(step1_sols_a: solve(equation1,a)) > 0 then
       (/* 備用分支:若解不出 b,改嘗試解出 a */
        for s1a in step1_sols_a do
            (print("由第一式解出",s1a),
             print("代入第二式化簡得", step2_eq:radcan(subst(s1a,equation2))),
             sol_b_list: solve(step2_eq,b),
             for sb in sol_b_list do
               (sa:radcan(ev(s1a,sb)),
                solutions: append(solutions,[[sa,sb]])
              )
           )
       )
    else
       (/* 最終退路分支 */
        print("無法單獨解出變數,退回常規聯立求解"),
        solutions: solve([equation1,equation2], [a,b])
       ),
    print("解方程式最終結果",solutions),
    CommonTangent:[],
    for solution in solutions do
       (if freeof(%i,solution)=true then /*freeof(%i,)檢查是否有虛數單位%i*/
          (print("將實數解",solution,"代入切線方程式",Tangenta-y=0,
                ",得",tangent:ev(Tangenta-y=0,solution)),
           CommonTangent:append(CommonTangent,[tangent])
          )
       ),
    return(CommonTangent)
)$


109高雄市高中聯招求公切線
(%i3) CommonTangent(y=x^3-3*x+1, y=x^3-3*x+33);
設\(y=x^3-3x+1\)切點\((a,a^3-3a+1)\),切線斜率\(ma=3a^2-3\)
切線方程式\(y=(3a^2-3)(x-a)+a^3-3a+1\),化簡\(y=(3a^2-3)x-2a^3+1\)
設\(y=x^3-3x+33\)切點\((b,b^3-3b+33)\),切線斜率\(mb=3b^2-3\)
切線方程式\(y=(3b^2-3)(x-b)+b^3-3b+33\),化簡\(y=(3b^2-3)x-2b^3+33\)
切線方程式比較係數\(\left[\matrix{3a^2-3=3b^2-3\cr 1-2a^3=33-2b^3}\right]\),移項\(\left[\matrix{3a^2-3b^2=0\cr 2b^3-2a^3-32=0}\right]\),同除\(\left[\matrix{a^2-b^2=0\cr b^3-a^3-16=0}\right]\)
利用代入消去法求解
由第一式解出\(b=-a\)
代入第二式化簡得\(-4a^3-32=0\)
由第一式解出\(b=a\)
代入第二式化簡得\(-32=0\)
解方程式最終結果\([ [a=1-\sqrt{3}\%i,b=\sqrt{3}\%i-1],[a=\sqrt{3}\%i+1,b=-\sqrt{3}\%i-1],[a=-2,b=2] ]\)
將實數解\([a=-2,b=2]\)代入切線方程式\(-y+(3a^2-3)x-2a^3+1=0\),得\(-y+9x+17=0\)
(%o3) \([-y+9x+17=0]\)

115明倫高中求公切線
(%i4) CommonTangent(y=x^2, y=(x-2)^2+4);
設\(y=x^2\)切點\((a,a^2)\),切線斜率\(ma=2a\)
切線方程式\(y=2a(x-a)+a^2\),化簡\(y=2ax-a^2\)
設\(y=(x-2)^2+4\)切點\((b,(b-2)^2+4)\),切線斜率\(mb=2(b-2)\)
切線方程式\(y=2(b-2)(x-b)+(b-2)^2+4\),化簡\(y=(2b-4)x-b^2+8\)
切線方程式比較係數\(\left[\matrix{2a=2b-4\cr -a^2=8-b^2}\right]\),移項\(\left[\matrix{-2b+2a+4=0\cr b^2-a^2-8=0}\right]\),同除\(\left[\matrix{-b+a+2=0\cr b^2-a^2-8=0}\right]\)
利用代入消去法求解
由第一式解出\(b=a+2\)
代入第二式化簡得\(4a-4=0\)
解方程式最終結果\([[a=1,b=3]]\)
將實數解\([a=1,b=3]\)代入切線方程式\(-y+2ax-a^2=0\),得\(-y+2x-1=0\)
(%o4) \([-y+2x-1=0]\)

115永春高中求公切線
(%i5) CommonTangent(y=%e^(-x), y=-%e^(x+1));
設\(y=\%e^{-x}\)切點\((a,\%e^{-a})\),切線斜率\(ma=-\%e^{-a}\)
切線方程式\(y=\%e^{-a}-\%e^{-a}(x-a)\),化簡\(y=-\%e^{-a}x+a\%e^{-a}+\%e^{-a}\)
設\(y=-\%e^{x+1}\)切點\((b,-\%e^{b+1})\),切線斜率\(mb=-\%e^{b+1}\)
切線方程式\(y=-\%e^{b+1}(x-b)-\%e^{b+1}\),化簡\(y=(b-1)\%e^{b+1}-\%e^{b+1}x\)
切線方程式比較係數\(\left[\matrix{-\%e^{-a}=-\%e^{b+1}\cr \%e^{-a}a+\%e^{-a}=\%e^{b+1}(b-1)}\right]\),移項\(\left[\matrix{\%e^{b+1}-\%e^{-a}=0\cr -\%e^{b+1}(b-1)+\%e^{-a}a+\%e^{-a}=0}\right]\),同除\(\left[\matrix{\%e^{b+a+1}-1=0\cr -\%e^{b+a+1}b+a+\%e^{b+a+1}+1=0}\right]\)
利用代入消去法求解
由第一式解出\(b=-a-1\)
代入第二式化簡得\(\%e^{-a}(2a+3)=0\)
解方程式最終結果\(\displaystyle \left[\left[a=-\frac{3}{2},b=\frac{1}{2}\right]\right]\)
將實數解\(\displaystyle \left[a=-\frac{3}{2},b=\frac{1}{2}\right]\)代入切線方程式\(-y-\%e^{-a}x+\%e^{-a}a+\%e^{-a}=0\),得\(\displaystyle -y-\%e^{3/2}x-\frac{\%e^{3/2}}{2}=0\)
(%o5) \(\displaystyle \left[-y-\%e^{3/2}x-\frac{\%e^{3/2}}{2}=0\right]\)

有2條公切線題目
(%i6) CommonTangent(y=x^2, y=-x^2+8*x-10);
設\(y=x^2\)切點\((a,a^2)\),切線斜率\(ma=2a\)
切線方程式\(y=2a(x-a)+a^2\),化簡\(y=2ax-a^2\)
設\(y=-x^2+8x-10\)切點\((b,-b^2+8b-10)\),切線斜率\(mb=8-2b\)
切線方程式\(y=(8-2b)(x-b)-b^2+8b-10\),化簡\(y=(8-2b)x+b^2-10\)
切線方程式比較係數\(\left[\matrix{2a=8-2b\cr -a^2=b^2-10}\right]\),移項\(\left[\matrix{2b+2a-8=0\cr -b^2-a^2+10=0}\right]\),同除\(\left[\matrix{b+a-4=0\cr -b^2-a^2+10=0}\right]\)
利用代入消去法求解
由第一式解出\(b=4-a\)
代入第二式化簡得\(-2a^2+8a-6=0\)
解方程式最終結果\([[a=3,b=1],[a=1,b=3]]\)
將實數解\([a=3,b=1]\)代入切線方程式\(-y+2ax-a^2=0\),得\(-y+6x-9=0\)
將實數解\([a=1,b=3]\)代入切線方程式\(-y+2ax-a^2=0\),得\(-y+2x-1=0\)
(%o6) \([-y+6x-9=0,-y+2x-1=0]\)

115宜蘭高中求公切線
(%i7) CommonTangent(y=x^3+x, y=x^3+x+k);
設\(y=x^3+x\)切點\((a,a^3+a)\),切線斜率\(ma=3a^2+1\)
切線方程式\(y=(3a^2+1)(x-a)+a^3+a\),化簡\(y=(3a^2+1)x-2a^3\)
設\(y=x^3+x+k\)切點\((b,k+b^3+b)\),切線斜率\(mb=3b^2+1\)
切線方程式\(y=(3b^2+1)(x-b)+k+b^3+b\),化簡\(y=(3b^2+1)x+k-2b^3\)
切線方程式比較係數\(\left[\matrix{3a^2+1=3b^2+1\cr -2a^3=k-2b^3}\right]\),移項\(\left[\matrix{3a^2-3b^2=0\cr -k+2b^3-2a^3=0}\right]\),同除\(\left[\matrix{a^2-b^2=0\cr -k+2b^3-2a^3=0}\right]\)
利用代入消去法求解
由第一式解出\(b=-a\)
代入第二式化簡得\(-k-4a^3=0\)
由第一式解出\(b=a\)
代入第二式化簡得\(-k=0\)
解方程式最終結果\(\displaystyle \left[\left[a=-\frac{(\sqrt{3}\%i-1)k^{1/3}}{2\cdot 4^{1/3}},b=\frac{(\sqrt{3}\%i-1)k^{1/3}}{2^{5/3}}\right],\left[a=\frac{(\sqrt{3}\%i+1)k^{1/3}}{2\cdot 4^{1/3}},b=-\frac{(\sqrt{3}\%i+1)k^{1/3}}{2^{5/3}}\right],\left[a=-\frac{k^{1/3}}{4^{1/3}},b=\frac{k^{1/3}}{2^{2/3}}\right]\right]\)
將實數解\(\displaystyle \left[a=-\frac{k^{1/3}}{4^{1/3}},b=\frac{k^{1/3}}{2^{2/3}}\right]\)代入切線方程式\(-y+(3a^2+1)x-2a^3=0\),得\(\displaystyle -y+\left(\frac{3k^{2/3}}{4^{2/3}}+1\right)x+\frac{k}{2}=0\)
(%o7) \(\displaystyle \left[-y+\left(\frac{3k^{2/3}}{4^{2/3}}+1\right)x+\frac{k}{2}=0\right]\)

公切線方程式的斜率\(\displaystyle m=-\frac{a}{b}\)
(%i8) m:-coeff(lhs(%[1]),x,1)/coeff(lhs(%[1]),y,1);
(%o8) \(\displaystyle\frac{3k^{2/3}}{4^{2/3}}+1\)

solve_rat_ineq無法處理\(\displaystyle \frac{2}{3}\)次方的不等式
(%i9) solve_rat_ineq(m>7/4);
solve_rat_ineq: Inequality is not real: \(\displaystyle \frac{3k^{2/3}+4^{2/3}}{4^{2/3}}>\frac{7}{4}\)
#0: solve_rat_ineq(ineq=(3*k^(2/3))/4^(2/3)+1 > 7/4) (solve_rat_ineq.mac line 43)
-- an error. To debug this try: debugmode(true);


手動化簡不等式
(%i10) ineq1:m>7/4;
(%o10) \(\displaystyle\frac{3k^{2/3}}{4^{2/3}}+1>\frac{7}{4}\)

兩邊同減1
(%i11) ineq2: map(lambda([t], t-1),ineq1);
(%o11) \(\displaystyle\frac{3k^{2/3}}{4^{2/3}}>\frac{3}{4}\)

兩邊同除3
(%i12) ineq3: map(lambda([t], t/3),ineq2);
(%o12) \(\displaystyle\frac{k^{2/3}}{4^{2/3}}>\frac{1}{4}\)

兩邊同3次方
(%i13) ineq4: map(lambda([t], t^3),ineq3);
(%o13) \(\displaystyle \frac{k^2}{16}>\frac{1}{64}\)

兩邊同乘16
(%i14) ineq5: map(lambda([t], t*16),ineq4);
(%o14) \(\displaystyle k^2>\frac{1}{4}\)

重新執行solve_rat_ineq求k的範圍
(%i15) solve_rat_ineq(ineq5);
(%o15) \(\displaystyle \left[\left[k<-\frac{1}{2}\right],\left[k>\frac{1}{2}\right]\right]\)

TOP

 43 12345
發新話題
最近訪問的版塊