Stats

Popular Posts

Followers

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 的圖形呢?

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畫出 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 的圖形呢?
Tags: , ,

讀者回應 ( 0 意見 )

發佈留言

Please leave your name and tell me what you thought about this site. Comments, suggestions and views are welcomed.

如果這篇文章對你有幫助,那請留個訊息給我~