The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 Fitting integrals

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
MBIMO Posted - 11/29/2004 : 10:17:52 AM
Origin Version (Select Help-->About Origin): 7 SR4
Operating System: Win2k

Hi all,

I want to fit an implicit function y(x) i. e. a function that can't be solved, neither for y nor for x.
However the derivative of the function dy/dx can be calculated.
So I followed the steps of the following knowledge base article:

http://www.originlab.com/www/support/resultstech.aspx?language=english&ID=121

to fit the integral of dy/dx.

A test run using my function revealed that the fitted parameters varied up to 25% from the correct values even when I used the correct values as starting parameters for the fitting process.

I think the rather big errors are due to the numerical integration.
Is there a better way to fit such functions, which doesn't involve integrals?

Thanks for you suggestions.

Best regards,

Martin
2   L A T E S T    R E P L I E S    (Newest First)
MBIMO Posted - 12/02/2004 : 03:43:33 AM
Thanks Richard.

Plotting the function is not the problem, once the parameters are known I can use dx/dy to plot the function iteratively from a given starting point. This would also uniquely determine the integration constant C which is otherwise implicitly set to 0.

Meanwhile I further tracked down the problem. I used the test function:

f(x)=p*x^2

with p=2

So the derivative is:

f'(x)=2*p*x^2

I determined p by fitting Int(f'(x)). The result should be close to 2.
I did two test runs. One with 100 x-values between 0 and 100 and one with 100 x-values between 0 and 1.

Both runs just differ in the scale, however the first run gave an almost perfect result (p=2.05...), while the second run gave
p=-49.25...

So it seems that it's rather a stability problem of the fitting algorithm than a problem of integrating the function properly.

I will try to scale my data points before fitting them and then rescale them afterwards.

I hope this works out.
verrallr@a Posted - 12/01/2004 : 3:33:21 PM
I just have some comments, not the complete solution.

I take it you have your function in terms of dy/dx, for example it may be dy/dx=f(x), or possibly even dy/dx=f(x,y). And you want to plot the graph of Int(f(x)dx) or Int(f(x,y)dx). (I have to use Int for integral, because I cannot represent the integral sign using only Ascii characters.)

One thing to note is that, if you want to plot this graph, you can only determine evaluate it within a constant that does not depend on x or y. So, we can add a constant, so that we now have Int(f(x)dx)+C , where C does not depend on x or y. Because dC/dx=0. I wonder if that is how you seem to be "25% off from the correct values".

Secondly, I have looked at the reference you give for evaluating formulas involving integrals. I even did what this reference suggests. Nevertheless, I cannot really understand what they're doing.

If you have dy/dx=f(x), it seems you only need to place x in one column of Worksheet (this would be your X column), and f(x) in another (this would be your Y column), and then use integral for this column. If you did this, I think you would be establishing zero as your C. I haven't done this, and it may take a little work to get the integral values in another column of your original Worksheet.

However, I think you must use an integration to evaluate your function. Since you have only dy/dx, you must then use an integral.

Maybe, others can give more assistance.

Richard.

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000