Math Help Forum

Math Help Forum Feed Site Feed

Go Back   Math Help Forum > Math Resources > Mathematics Software Discussion
Reply
 
Thread Tools Display Modes
  #1  
Old November 30th, 2008, 01:23 PM
Newbie
 
Join Date: Nov 2008
Posts: 5
Country:
Thanks: 2
Thanked 0 Times in 0 Posts
ayildirim is on a distinguished road
Default Regression of series equation

Hello to everbody,
I wave an equation with datas and want to regress in non linear form with plot.
Would you help me to solve the equation bellow by any softwares, please?

The data, the equation and parameters are given bellow. I want to fit the data to non-linear equation to find D and k values.
I just need help.
Your sincerely,,

Equation:
M(t)=Mo - (Mo - Ms)*Pi*8*R*Ms*D [Sum((k*R^2 + Pi^2*D n^2)*k*R^2*t -Pi^2*R^2*D n^2 - (Pi^2*R^2*D n^2*
Exp[-t*(k*R^2 + D*Pi^2 n^2)/R^2])/(k*R^2 + n^2*D*Pi^2)^2]

[Sum] goas from 1 to 1000

Ms=140
Mo=11.58
R=0.004

Variables and Data
t M(t)
0 11.58
30 72.61
60 97.89
90 106.05
120 109.63
150 117.02
180 119.57
210 125.99
240 129.56
270 132.85

Last edited by ayildirim; December 1st, 2008 at 01:44 AM.
Reply With Quote
Advertisement
 
  #2  
Old November 30th, 2008, 04:18 PM
CaptainBlack's Avatar
Grand Panjandrum
 
Join Date: Nov 2005
Location: South of England
Posts: 11,265
Country:
Thanks: 656
Thanked 3,585 Times in 2,887 Posts
CaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond repute
Default

Quote:
Originally Posted by ayildirim View Post
Hello to everbody,
I wave an equation with datas and want to regress in non linear form with plot.
Would you help me to solve the equation bellow by any softwares, please?

The data, the equation and parameters are given bellow. I want to fit the data to non-linear equation to find a and k values.
I just need help.
Your sincerely,,

Equation:
M(t)=Mo - (Mo - Ms)*Pi*8*R*Ms*D [Sum((k*R^2 + Pi^2*D n^2)*k*R^2*t -Pi^2*R^2*D n^2 - (Pi^2*R^2*D n^2*
Exp[-t*(k*R^2 + D*Pi^2 n^2)/R^2])/(k*R^2 + n^2*D*Pi^2)^2]

[Sum] goas from 1 to 1000

Ms=140
Mo=11.58
R=0.004

Variables and Data
t M(t)
0 11.58
30 72.61
60 97.89
90 106.05
120 109.63
150 117.02
180 119.57
210 125.99
240 129.56
270 132.85
Try using the solver shipped with Excel.

CB
__________________
Truth does not change because it is, or is not, believed by a majority of the people.

Giordano Bruno
Reply With Quote
The following users thank CaptainBlack for this useful post:
Donate to MHF
  #3  
Old November 30th, 2008, 04:23 PM
Super Member
 
Join Date: Aug 2008
Posts: 566
Country:
Thanks: 44
Thanked 246 Times in 213 Posts
shawsend is a jewel in the roughshawsend is a jewel in the roughshawsend is a jewel in the rough
Default

Quote:
Originally Posted by ayildirim View Post

Equation:
M(t)=Mo - (Mo - Ms)*Pi*8*R*Ms*D [Sum((k*R^2 + Pi^2*D n^2)*k*R^2*t -Pi^2*R^2*D n^2 - (Pi^2*R^2*D n^2*
Exp[-t*(k*R^2 + D*Pi^2 n^2)/R^2])/(k*R^2 + n^2*D*Pi^2)^2]

[Sum] goas from 1 to 1000

Ms=140
Mo=11.58
R=0.004

Variables and Data
t M(t)
0 11.58
30 72.61
60 97.89
90 106.05
120 109.63
150 117.02
180 119.57
210 125.99
240 129.56
270 132.85
You got undefined D and I don't see any a in there.
__________________
"I am beset by the ironies in my life"
Reply With Quote
The following users thank shawsend for this useful post:
Donate to MHF
  #4  
Old December 1st, 2008, 01:35 AM
Newbie
 
Join Date: Nov 2008
Posts: 5
Country:
Thanks: 2
Thanked 0 Times in 0 Posts
ayildirim is on a distinguished road
Default

Here D and k are constans to be evaluated.

Equation:
M(t)=Mo - (Mo - Ms)*Pi*8*R*Ms*D [Sum((k*R^2 + Pi^2*D n^2)*k*R^2*t -Pi^2*R^2*D n^2 - (Pi^2*R^2*D n^2*
Exp[-t*(k*R^2 + D*Pi^2 n^2)/R^2])/(k*R^2 + n^2*D*Pi^2)^2]

[Sum] goas from 1 to 1000

Ms=140
Mo=11.58
R=0.004
Variables and Data
t M(t)
0 11.58
30 72.61
60 97.89
90 106.05
120 109.63
150 117.02
180 119.57
210 125.99
240 129.56
270 132.85
Reply With Quote
  #5  
Old December 1st, 2008, 05:02 AM
Super Member
 
Join Date: Aug 2008
Posts: 566
Country:
Thanks: 44
Thanked 246 Times in 213 Posts
shawsend is a jewel in the roughshawsend is a jewel in the roughshawsend is a jewel in the rough
Default

Hey is this it:

M(t)=Mo-C_1\sum _{n=0}^{1000} k R^2 t \left(\pi ^2 d n^2+k R^2\right)-\frac{\pi ^2 D n^2 R^2 \exp \left(-\frac{t \left(\pi ^2 D n^2+k R^2\right)}{R^2}\right)}{\left(\pi ^2 D n^2+k R^2\right)^2}-\pi ^2 D n^2 R^2

C_1=\pi  8 D \text{Ms} R (\text{Mo}-\text{Ms})

Ms=140,\; Mo=11.58,\;R=0.004

with D and k to be determined by the fit?
__________________
"I am beset by the ironies in my life"

Last edited by shawsend; December 1st, 2008 at 05:15 AM.
Reply With Quote
  #6  
Old December 1st, 2008, 08:50 AM
Newbie
 
Join Date: Nov 2008
Posts: 5
Country:
Thanks: 2
Thanked 0 Times in 0 Posts
ayildirim is on a distinguished road
Default regression

My question on attacment.
Attached Files
File Type: doc equation.doc (30.5 KB, 24 views)
Reply With Quote
  #7  
Old December 1st, 2008, 01:40 PM
Super Member
 
Join Date: Aug 2008
Posts: 566
Country:
Thanks: 44
Thanked 246 Times in 213 Posts
shawsend is a jewel in the roughshawsend is a jewel in the roughshawsend is a jewel in the rough
Default

Quote:
Originally Posted by ayildirim View Post
My question on attacment.
Ayildirim, that's harder to read than my equation above and also it looks to have another variable M_s or something other. Is the equation I posted the correct one and if not, what corrections have to be made.
__________________
"I am beset by the ironies in my life"
Reply With Quote
  #8  
Old December 2nd, 2008, 01:20 AM
Newbie
 
Join Date: Nov 2008
Posts: 5
Country:
Thanks: 2
Thanked 0 Times in 0 Posts
ayildirim is on a distinguished road
Default

In the equation that you send me, the division is only related to exp term. This is wrong. The division have to be for over all terms in Sum function.
Also the limits of sum function must be from 1 to 1000.
Reply With Quote
  #9  
Old December 2nd, 2008, 07:31 AM
Super Member
 
Join Date: Aug 2008
Posts: 566
Country:
Thanks: 44
Thanked 246 Times in 213 Posts
shawsend is a jewel in the roughshawsend is a jewel in the roughshawsend is a jewel in the rough
Default

Ok, this is what I did then:

Using:

M(t)=Mo-C_1\sum _{n=1}^{1000} \frac{ k R^2 t \left(\pi ^2 d n^2+k R^2\right)-\pi ^2 d n^2 R^2 \exp \left(-\frac{t \left(\pi ^2 d n^2+k R^2\right)}{R^2}\right)-\pi ^2 d n^2+k R^2}{(\pi^2 d n^2+k R^2)^2}

(changed D to d since D means derivative in Mathematica)

C_1=\pi  8 d \text{Ms} R (\text{Mo}-\text{Ms})

Ms=140,\; Mo=11.58,\;R=0.004

I wrote the following Mathematica code to try and fit the data to your expression. Unfortunately, Mathematica returns a negative value for d which quickly causes overflow with the sum (even with smaller upper limits on the sum overflow occurs):

Code:
vals={{0,11.58},{30,72.61},{60,97.89},
{90,106.05},{120,109.63},{150,117.02},
{180,119.57},{210,125.99},{240,129.56},
{270,132.85}}; 
lp = ListPlot[vals, PlotRange -> {{0, 200}, {0, 300}}]
coef = FindFit[vals, M[t], {d, k}, t]
p1 = Plot[f[t] /. coef, {t, 0, 3}]
Mathematica returns:

{d -> -1.84547*10^8, k -> 122.325}

Oh yeah, if the equation is still not correct, click on it. A small window will appear with the LaTex code I wrote to generate the math code. You can understand it. \frac means fraction in french brackets, power is ^, so forth. with the [math] brackets starting and ending it. Try and cut and paste it into a new post and edit the code as you wish even if it comes out messy. It's a start and you should try posting in Latex so everything is neat, well defined and explicit so people will follow it easily.
__________________
"I am beset by the ironies in my life"

Last edited by shawsend; December 2nd, 2008 at 07:50 AM.
Reply With Quote
  #10  
Old December 2nd, 2008, 08:04 AM
Newbie
 
Join Date: Nov 2008
Posts: 5
Country:
Thanks: 2
Thanked 0 Times in 0 Posts
ayildirim is on a distinguished road
Default regression of series equation

After Mo in the general equation (+) sign can be changed to (-) sign.
like this

M(t)=Mo+C1*.........................
Reply With Quote
  #11  
Old December 2nd, 2008, 09:25 AM
Super Member
 
Join Date: Aug 2008
Posts: 566
Country:
Thanks: 44
Thanked 246 Times in 213 Posts
shawsend is a jewel in the roughshawsend is a jewel in the roughshawsend is a jewel in the rough
Default

Quote:
Originally Posted by ayildirim View Post
After Mo in the general equation (+) sign can be changed to (-) sign.
like this

M(t)=Mo+C1*.........................
Hey ayildirim. That doesn't help. Still getting either underflow or overflow depending on how many terms I use for the sum.
__________________
"I am beset by the ironies in my life"
Reply With Quote
Reply

Thread Tools
Display Modes

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 Off
Refbacks are Off
Forum Jump


All times are GMT -7. The time now is 08:16 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
©2005 - 2009 Math Help Forum


Math Help Forum is a community of maths forums with an emphasis on maths help in all levels of mathematics.
Register to post your math questions or just hang out and try some of our math games or visit the arcade.