衍生物和牛顿拉斐逊 [英] derivative and newton raphson

查看:138
本文介绍了衍生物和牛顿拉斐逊的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经找到了一个寻找衍生物的代码,现在我试图用它来帮助我使用牛顿raphson方法的代码:

i have made a code for finding a derivative and now im trying to use it to help me with a code for the newton raphson method:

展开 | 选择 | Wrap | 行号

推荐答案


i已经找到了一个寻找衍生物的代码,现在我试图用它来帮我找到牛顿的代码raphson方法:
i have made a code for finding a derivative and now im trying to use it to help me with a code for the newton raphson method:
电子xpand | 选择 | Wrap | 行号


我应该如何修复它? fp in solve是fisrt函数。你使用第一个函数在第一个函数中得到f的导数。你知道我怎么解决这个问题吗?

how am im supposed to fix it? fp in solve is the fisrt function. u use the first function to get the derivative of f in the first function. do u know how i fix this?


在函数solve()中,你传递了参数''f'',''x0''和''H''。 x,fp和n的定义在哪里?你以递归方式调用函数''solve()'',但是你没有向它传递任何参数。 ''solve()''需要三个参数。 ''for''循环的格式为:
In function solve(), you have passed arguments ''f'', ''x0'' and ''h''. Where are ''x'', ''fp'', and ''n'' defined? You are calling function ''solve()'' recursively, but you are not passing any arguments to it. ''solve()'' requires three arguments. The format of a ''for'' loop is:
展开 | 选择 | Wrap | 行号



我应该怎么解决它? fp in solve是fisrt函数。你使用第一个函数在第一个函数中得到f的导数。你知道我怎么解决这个问题吗?
how am im supposed to fix it? fp in solve is the fisrt function. u use the first function to get the derivative of f in the first function. do u know how i fix this?



我不熟悉你正在尝试的计算。我知道如果''fp()''没有在''solve()''中定义,或者在你的模块中全局定义,它将不起作用。

I am not familiar with the calculation you are attempting. I know that it will not work if ''fp()'' is not defined inside of ''solve()'' or globally to your module.


这篇关于衍生物和牛顿拉斐逊的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆