[其他] dsolve指令於R2009b.R2008a之解不同已回收
如題,以下是發生問題的指令
R2009b
程式碼
syms x y
Exact=dsolve('D2y=-4*y+cos(x)','y(0)=0','y(pi/4)=0','x')
執行結果
Exact =
sin(2*x)*(sin(x)/2 - (4*tan(x/2)^2*sin(x))/(3*(tan(x/2)^2 + 1)^2)) - sin(2*x)*(2^(1/2)/4 - (2*2^(1/2)*(2^(1/2) - 1)^2)/(3*((2^(1/2) - 1)^2 + 1)^2)) - (2*cos(2*x))/3 + (2*cos(2*x)*(3*tan(x/2)^4 + 1))/(3*(tan(x/2)^2 + 1)^3)
-----------------------防暈眩分隔線------------------------
R2008a
程式碼
syms x y
Exact=dsolve('D2y=-4*y+cos(x)','y(0)=0','y(pi/4)=0','x')
執行結果
Exact =
-1/6*sin(2*x)*2^(1/2)-1/3*cos(2*x)+1/3*cos(x)
-----------------------防暈眩分隔線------------------------
兩者結果不同,小弟不知道問題出在哪,所以想請各位先輩解答
小弟計算後,答案與R2008a相符
感謝!!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 120.101.30.202
※ 編輯: x46824682x 來自: 120.101.30.220 (03/09 00:22)
※ 編輯: x46824682x 來自: 120.101.30.220 (03/09 00:24)
※ 編輯: x46824682x 來自: 120.101.30.220 (03/09 00:25)
※ 編輯: x46824682x 來自: 120.101.30.220 (03/09 00:27)
MATLAB 近期熱門文章
PTT數位生活區 即時熱門文章