Results 1 to 8 of 8

Math Help - Method of Least Squares

  1. #1
    Newbie
    Joined
    Apr 2011
    Posts
    18

    Question Method of Least Squares

    Question:

    A capacitor C is initially charged to 10V and then connected across a resistor R. The current through R is measured at 1 milisecond intervals is:

    t : 0 1 2 3 4 ms +-0.5%
    i : 4.5 2.8 1.5 1.0 0.6 mA +-2.5%

    (Basically this is a table where i corresponds to the t value)
    Using the method of least squares, find R and C.


    I need help on what equation I should use. Is it i=ie-(t/RC)?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Forum Admin topsquark's Avatar
    Joined
    Jan 2006
    From
    Wellsville, NY
    Posts
    9,939
    Thanks
    338
    Awards
    1
    Quote Originally Posted by Salcybercat View Post
    Question:

    A capacitor C is initially charged to 10V and then connected across a resistor R. The current through R is measured at 1 milisecond intervals is:

    t : 0 1 2 3 4 ms +-0.5%
    i : 4.5 2.8 1.5 1.0 0.6 mA +-2.5%

    (Basically this is a table where i corresponds to the t value)
    Using the method of least squares, find R and C.


    I need help on what equation I should use. Is it i=ie-(t/RC)?
    If you meant I = I0 * e^{-t/(RC)}, then yes. So take the ln of both sides to do your linear regression.

    -Dan
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Apr 2011
    Posts
    18
    Just to make sure, I0 would be the initial current when t=0, which would make the equation I = 4.5 * e^{-t/(RC)}. Am I right?
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Forum Admin topsquark's Avatar
    Joined
    Jan 2006
    From
    Wellsville, NY
    Posts
    9,939
    Thanks
    338
    Awards
    1
    Quote Originally Posted by Salcybercat View Post
    Just to make sure, I0 would be the initial current when t=0, which would make the equation I = 4.5 * e^{-t/(RC)}. Am I right?
    I0 is one of the pieces of information you want to calculate. Take the ln of both sides of the equation:








    The advantage of this form is that the equation is now in the form y = mx + b where y = ln(I) and x = t. So to do the linear regression use the t values as your x data and ln(I) values as your y data. You will come out with a slope and an intercept. The slope will be equal to -1/(RC) and the intercept will be ln(I0).

    -Dan
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Apr 2011
    Posts
    18
    Thank you for the clarification! However, I still didn't manage to get the answer. (R=2.2kohm and C = 0.89microFarad)
    I've attached my workings below. I hope it's clear enough for you to understand. Do comment on any mistaken steps.

    Follow Math Help Forum on Facebook and Google+

  6. #6
    Forum Admin topsquark's Avatar
    Joined
    Jan 2006
    From
    Wellsville, NY
    Posts
    9,939
    Thanks
    338
    Awards
    1
    Quote Originally Posted by Salcybercat View Post
    Thank you for the clarification! However, I still didn't manage to get the answer. (R=2.2kohm and C = 0.89microFarad)
    I've attached my workings below. I hope it's clear enough for you to understand. Do comment on any mistaken steps.

    I cheated and did the regression on my calculator. My answers are close, but different from yours. If you are allowed to use a computer to do the problem I'd recommend it.

    I get m = 0.505943 x 10^3 /s and c = 1.497552. Thus I'm getting 1/(RC) = 0.505943 x 10^3 /s and I0 = 4.47073 x 10^{-3} A.

    Now we have to get a bit wily. We only have one number to get RC so we need another relationship. We get that through the definition of capacitance:
    C = Q/V, where Q is the initial charge on the capacitor (unknown at this point) and V is the charging potential 10 V. So...



    Now recall that V = I0*R when the capacitor starts to discharge:


    and we have values of 1/(RC) and I0 from the regression. So you can find Q. From Q you can find C. From C you can find R.

    Using my values I get your given answers. Your values give answers slightly off from that. I am at a loss as to what advice to give you to allow you to calculate better numbers.

    -Dan
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    Apr 2011
    Posts
    18
    I must've done something wrong rounding up the numbers when calculating it manually (and no, we wouldn't be allowed to use computers during our exams )
    Yes I was confused about what other equations I needed to use to compare with the RC-equation. ( I thought of using the equation of i = C (dv/dt) but I wasn't sure if the method of least squares would work with a differential equation.
    But thank you for the step-to-step explanation! I got the answers
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Forum Admin topsquark's Avatar
    Joined
    Jan 2006
    From
    Wellsville, NY
    Posts
    9,939
    Thanks
    338
    Awards
    1
    Quote Originally Posted by Salcybercat View Post
    I must've done something wrong rounding up the numbers when calculating it manually (and no, we wouldn't be allowed to use computers during our exams )
    Bummer. I particularly hate doing these "by hand." Glad you got the answers and good luck on the exams!

    -Dan
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 1
    Last Post: December 11th 2010, 10:16 PM
  2. Help please--->Method of Least Squares
    Posted in the Algebra Forum
    Replies: 1
    Last Post: April 14th 2010, 10:06 AM
  3. How To Find "n" For Method Of Least Squares?
    Posted in the Calculus Forum
    Replies: 1
    Last Post: April 6th 2010, 11:49 PM
  4. Replies: 0
    Last Post: November 30th 2009, 04:18 AM
  5. Method of Least Squares
    Posted in the Advanced Statistics Forum
    Replies: 7
    Last Post: October 16th 2008, 05:05 PM

Search Tags


/mathhelpforum @mathhelpforum