Results 1 to 12 of 12

Math Help - Translation of cubic graphs

  1. #1
    Newbie
    Joined
    Apr 2008
    From
    London
    Posts
    12

    Translation of cubic graphs

    I'm trying to work out what the new co-efficients for a cubic function would be if it was shifted distance p along the x axis.

    I don't know why i can't seem to do it!

    I can do it using f(x-p), like y=a(x-p)^3+b(x-p)^2+c(x-p)+d

    but i need it so that i just have a single co-efficient for a b c and d, so when i find the roots of that equation, i find the roots=x, not the roots=x-p (i know i can just +p afters, but that doesn't work in the particular application i'm using).

    I graphed a few on excel (as it's got the curve fit that displays eqns) but i can't find a relationship, more to the point I perhaps don't know how to go about it when it's more complicated than just x^3.

    From what I've done, i can see there must be a standard way of creating co-efficients so that i can shift in x, if anyone can tell me how to get to there, i'd be really greatful.

    Thanks!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member
    earboth's Avatar
    Joined
    Jan 2006
    From
    Germany
    Posts
    5,830
    Thanks
    123
    Quote Originally Posted by potticus View Post
    I'm trying to work out what the new co-efficients for a cubic function would be if it was shifted distance p along the x axis.

    I don't know why i can't seem to do it!

    I can do it using f(x-p), like y=a(x-p)^3+b(x-p)^2+c(x-p)+d

    but i need it so that i just have a single co-efficient for a b c and d, so when i find the roots of that equation, i find the roots=x, not the roots=x-p (i know i can just +p afters, but that doesn't work in the particular application i'm using).

    I graphed a few on excel (as it's got the curve fit that displays eqns) but i can't find a relationship, more to the point I perhaps don't know how to go about it when it's more complicated than just x^3.

    From what I've done, i can see there must be a standard way of creating co-efficients so that i can shift in x, if anyone can tell me how to get to there, i'd be really greatful.

    Thanks!
    I'm not sure if I understand your problem. (?)

    Expand the brackets:

    y=a(x-p)^3+b(x-p)^2+c(x-p)+d ~\implies ~ y = ax^3 - 3apx^2 + bx^2 + 3ap^2x - 2bpx + cx - ap^3 + bp^2 - cp + d

    Collect the coefficient of the powers of x:

    y = ax^3+(b-3ap)x^2 + (3ap^2-2bp+c)x+(d-ap^3+bp^2-cp)
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Apr 2008
    From
    London
    Posts
    12
    By doing that, you are saying that (here a=b=c=d=1, x=2 and p=1):

    1(2-1)^3 = 1(2^3 - 1^3)

    1 = 7

    You can't just expand the brackets like that, so I don't know what to do
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Lord of certain Rings
    Isomorphism's Avatar
    Joined
    Dec 2007
    From
    IISc, Bangalore
    Posts
    1,465
    Thanks
    6
    Quote Originally Posted by potticus View Post
    By doing that, you are saying that (here a=b=c=d=1, x=2 and p=1):

    1(2-1)^3 = 1(2^3 - 1^3)

    1 = 7

    You can't just expand the brackets like that, so I don't know what to do
    earboth never said 1(2-1)^3 = 1(2^3 - 1^3). You cant expand identities that way. You should know algebra well to understand co-ordinate geometry.

    Try expanding (a-b)^3 and tell me the answer...

    You will see earboth is correct!
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Apr 2008
    From
    London
    Posts
    12
    My bad - I was sitting here doing it while you posted ... but I got different co-efficients, and neither set worked when i plugged them into excel, comparing them to numbers calculated using (x-p)... directly.

    My x and y values are something like this ...

    0 0 1
    0.1 0.181 1.111
    0.2 0.328 1.248
    0.3 0.447 1.417

    x values: 0, 0.1, 0.2, 0.3
    (x-p)...: 0, 0.181, 0.328, 0.447
    expanded: 1, 1.111, 1.248, 1.417
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Lord of certain Rings
    Isomorphism's Avatar
    Joined
    Dec 2007
    From
    IISc, Bangalore
    Posts
    1,465
    Thanks
    6
    Quote Originally Posted by potticus View Post
    My bad - I was sitting here doing it while you posted ... but I got different co-efficients, and neither set worked when i plugged them into excel, comparing them to numbers calculated using (x-p)... directly.

    My x and y values are something like this ...

    0 0 1
    0.1 0.181 1.111
    0.2 0.328 1.248
    0.3 0.447 1.417

    x values: 0, 0.1, 0.2, 0.3
    (x-p)...: 0, 0.181, 0.328, 0.447
    expanded: 1, 1.111, 1.248, 1.417
    Instead of the values, could you show your working? Work out the coefficients and we will tell you where you went wrong....

    Its more instructive than trying values...
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    Apr 2008
    From
    London
    Posts
    12
    expanding (x-p)^2:
    (x^2 - 2px + p^2)

    expanding (x-p)^3:
    (x^3 - 2px^2 + p^2x +px^2 - 2p^2x + p^3)

    stick in the coefficients and rearrange ...

    I get (a)x^3 + (b-3ap)x^2 + (2ap^2 - 2bp +c)x + (d-cp-ap^3+bp^2)

    But not the same answers as for (x-p)... directly.
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Newbie
    Joined
    Apr 2008
    From
    London
    Posts
    12
    I missed a term >_<

    Should be 3ap^2, as 2nd post ...

    But still doesn't work
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Lord of certain Rings
    Isomorphism's Avatar
    Joined
    Dec 2007
    From
    IISc, Bangalore
    Posts
    1,465
    Thanks
    6
    Quote Originally Posted by potticus View Post
    expanding (x-p)^2:
    (x^2 - 2px + p^2)
    Right

    expanding (x-p)^3:
    (x^3 - 2px^2 + p^2x +px^2 - 2p^2x + p^3)
    Wrong!
    (x-p)^3 = (x^3 - 2px^2 + p^2x - px^2 + 2p^2x - p^3)

    stick in the coefficients and rearrange ...

    I get (a)x^3 + (b-3ap)x^2 + (2ap^2 - 2bp +c)x + (d-cp-ap^3+bp^2)

    But not the same answers as for (x-p)... directly.
    Try again...
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Newbie
    Joined
    Apr 2008
    From
    London
    Posts
    12
    Including the term i missed out (above) it is actually right, but i had a excel error, brackets in the wrong place!

    >_<
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Lord of certain Rings
    Isomorphism's Avatar
    Joined
    Dec 2007
    From
    IISc, Bangalore
    Posts
    1,465
    Thanks
    6
    Quote Originally Posted by potticus View Post
    Including the term i missed out (above) it is actually right, but i had a excel error, brackets in the wrong place!

    >_<
    Good

    Generally its better to review your algebra, if you are worried about such an expression. Most likely you will gain better from that. Of course, I am not denying the usage of excel but merely asking you to trust your algebra
    Follow Math Help Forum on Facebook and Google+

  12. #12
    Newbie
    Joined
    Apr 2008
    From
    London
    Posts
    12
    True, but I'm using this in a computer program i'm writing, so comparing it on excel at least assures me that it's correct before i do some implementation with it to find everything's wrong :P

    thanks for your help
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Cubic graphs with a bridge
    Posted in the Discrete Math Forum
    Replies: 0
    Last Post: September 17th 2011, 03:17 PM
  2. Replies: 4
    Last Post: March 23rd 2010, 11:52 AM
  3. Need help:Challenging Cubic graphs....
    Posted in the Algebra Forum
    Replies: 0
    Last Post: August 25th 2009, 07:58 PM
  4. translation
    Posted in the Geometry Forum
    Replies: 1
    Last Post: January 28th 2009, 10:52 AM
  5. Translation of the cos-1
    Posted in the Trigonometry Forum
    Replies: 5
    Last Post: April 9th 2008, 05:25 PM

Search Tags


/mathhelpforum @mathhelpforum