gtemp[t_]:=Block[{s,x,temp,temp1,temp2},
temp=Integrate[Sqrt[s(s+2)],s];
temp1=temp/.s->1;
temp2=temp/.s->x;
{t,x}/.Quiet@FindRoot[temp2-temp1==Exp[t]-1,{x,1}]
]
(* 利用 Interpolation 擬和 一個連續的函數 g[t] *)
g[t_]=Interpolation[Parallelize[gtemp[#]&/@Range[1,10,0.1]]][t];
Plot[g[t],{t,1,10}]
f[t_]:=Exp[t]+0.5*NIntegrate[1/g[s],{s,0,Exp[t]-1}]
Plot[f[t],{t,1,10}]
u[x_,t_]:=Max[(Exp[t]/f[t])(1-(Cosh[0.5x]-1)/g[t]),0]
Plot3D[u[x,t],{t,1,10},{x,0,10}]
Mathematica 教學 隱函數繪圖
由 戴忠淵 於 2012年10月3日星期三
上午10:12 發表
![想用Mathematica畫出 u(x,t) 對 x 和 t 的圖形 u(x,t) 是這樣定義的: u(x,t)=max { [ (e^t) / f(t) ] [ 1-(cosh(0.5x)-1) / g(t) ] , 0 }, where g(t) is defined by Integrate[ sqrt[s(s+2)], {s,1, g(t)} ]=e^t-1, and f(t)=e^t+0.5* Integrate[1/g(s), {s,0, e^t-1} ] 故u(x,t) 是由 g(t) and f(t) 組成 而 g(t) and f(t) 都是implicitly defined 這樣用Mathematica應該要用怎樣的指令 可以畫出 u(x,t) 對 x 和 t 的圖形呢?](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_XIiRaYUN4v6s2LPJi1RnB9fZwrAYIxb2433M7d9GKVBrd8BEHL580mfitNMwzKOhihpTjmwuTnxU-FMhWhdYKhhMfkWZVFiZiKxXpHq-G528E__MZ4vWT4bmOhCWkGv8_V2T0lAn3Fc/s400/%E8%9E%A2%E5%B9%95%E5%BF%AB%E7%85%A7+2012-10-03+%E4%B8%8A%E5%8D%8810.07.04.png)
![想用Mathematica畫出 u(x,t) 對 x 和 t 的圖形 u(x,t) 是這樣定義的: u(x,t)=max { [ (e^t) / f(t) ] [ 1-(cosh(0.5x)-1) / g(t) ] , 0 }, where g(t) is defined by Integrate[ sqrt[s(s+2)], {s,1, g(t)} ]=e^t-1, and f(t)=e^t+0.5* Integrate[1/g(s), {s,0, e^t-1} ] 故u(x,t) 是由 g(t) and f(t) 組成 而 g(t) and f(t) 都是implicitly defined 這樣用Mathematica應該要用怎樣的指令 可以畫出 u(x,t) 對 x 和 t 的圖形呢?](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTDqjLwBK8CMu2fm8iXtT95SRAShzzaRkYGWtt6YZSjh9n5vzsitZZsCALicirXY12CHL0FZ5weoOmTwWZtweTv3PiwZatvowmPGO2_JGpVW7qJcAhS2UeHvNDEOtOIJWwa0dlBPyq7zM/s400/u.png)
讀者回應 ( 0 意見 )
訂閱發佈留言 (Atom)
發佈留言
Please leave your name and tell me what you thought about this site. Comments, suggestions and views are welcomed.
如果這篇文章對你有幫助,那請留個訊息給我~