CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Nonlinear solver & Differentiation Chain Rule

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 5, 2009, 07:36
Default Nonlinear solver & Differentiation Chain Rule
  #1
Frank
Guest
 
Posts: n/a
I am trying to solve a horrible function using newtons method and need to differentiate it. There is only one unknown variable x.

The problem is that the function I am looking at is a function of a function of a function... very nonlinear and nasty. I don't have access to my elementary textbooks from work and am pretty rusty when it comes to differentiation.

Am I right in thinking that I can repeatedly apply the chain rule, e.g

du/dx = du/da * da/db * db/dx

I'm pretty sure this is right but wanted to make sure before I start sticking coefficients in the software.

  Reply With Quote

Old   February 5, 2009, 08:42
Default Re: Nonlinear solver & Differentiation Chain Rule
  #2
Farid
Guest
 
Posts: n/a
Yes of course!You have to use the chain rule until the expression is easy enough to compute db/dx. If it's a really nasty expression, I would suggest you to do it with Matlab! Otherwise you might make a mistake by solving it by hand.

syms x; (new line) y = nasty espression; (new line) diff(y,x)

That's it Cheers Farid
  Reply With Quote

Old   February 6, 2009, 03:17
Default Re: Nonlinear solver & Differentiation Chain Rule
  #3
Praveen. C
Guest
 
Posts: n/a
If you have a computer program that is computing these functions, then you can use automatic differentiation. No pain in this. See http://www.autodiff.org

There are AD tools for fortran, C and even matlab.
  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
different results between serial solver and parallel solver wlt_1985 FLUENT 11 October 12, 2018 09:23
Could someone suggest simple (nonlinear) solver Bren Main CFD Forum 10 March 7, 2009 07:36
gcc and executable file from Mac to Linux simone Marras Main CFD Forum 0 April 8, 2007 16:49
Is there any nonlinear solver package at Windows? leaf Main CFD Forum 0 July 11, 2006 00:45
public domain f77 separable nonlinear least squares solver wanted Sergei Chernyshenko Main CFD Forum 10 January 28, 2000 14:56


All times are GMT -4. The time now is 00:53.