Stats

Popular Posts

Followers

Use Gradient method to find the Solution of nonlinear systems in Mathematica

養花種魚數月亮賞星星 於 2008年12月11日星期四 上午12:15 發表
mathematica;教學;pdf mathematica 6教學 mathematica基本教學

In[1]: f[x_,y_]:=x^2+y^2-1;g[x_,y_]:=y-x*Exp[x];
In[2]: delta[x_,y_]=Inverse[D[{f[x,y],g[x,y]},{{x,y}}]].{f[x,y],g[x,y]};
In[3]: NestList[N[##-Apply[delta,##]]&,{1,0.5},5]//TableForm


In[4]: NestWhile[N[##-Apply[delta,##]]&,{1,0.5},Unequal,All]
Out[4]: {0.513489,0.858096} Tags:

讀者回應 ( 0 意見 )

發佈留言

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

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