Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

swissgirl Group Title

Cubic Splines

  • one year ago
  • one year ago

  • This Question is Closed
  1. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    @DanielxAK Can you help me through this problem. It seems quite simple

    • one year ago
  2. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    \(S_0(x)=1+2x-x^3 \to 0 \leq x \leq 1\) \(S_1(x)=2+b(x-1)+c(x-1)^2+d(x-3)^3 \to 1 \leq x \leq 2\)

    • one year ago
  3. DanielxAK Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Sorry for the late reply. I was at class and then attended a seminar. Anyway: You know your three points. 0, 1 and 2. You have been given some of your coefficients ( specifically five of them) and need to find the other 3. So, you need 3 equations. Can you tell me which 3 equations you need to use? You're almost given one of them to start.

    • one year ago
  4. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Yes I figured it out \(S_0'(1)=S_1'(1)\) \(S_0''(1)=S_1''(1)\) \(S_1''(2)=0\) THHAANKKSSSS :)

    • one year ago
  5. DanielxAK Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Um. Be careful there. S1''(2) = 0 implies that you have a natural spline. You don't know that. So, that doesn't work. But, you're almost there. Looking at the first two equations you gave me (which are correct), can you find a very similar equation that follows the same pattern as those two?

    • one year ago
  6. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Oh i forgot to mention that it is a natural spline lol

    • one year ago
  7. DanielxAK Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Ah, okay. Well, in case you didn't know, you should still be able to solve it by using the fact that: S0(1) = S1(1), as they have the same y value.

    • one year ago
  8. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Gotcha Can i dirve you crazy with one more question?

    • one year ago
  9. DanielxAK Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Go for it. I'm trying to avoid my own homework as it is.

    • one year ago
  10. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    hahaha I do the same. I sit on here answering questions and im like thinking y the hell am I on here when I gotta do my own

    • one year ago
  11. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Construct a natural cubic spline to approximate f(x)=Cos(pi*x) by using the values given by f(x) at x=0, .25,.5, .75 and1 Integrate the spline over [0,1]

    • one year ago
  12. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    I think I am allowed to use a computer program but \i am wondering How can this be done by hand

    • one year ago
  13. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Or is it wayyy too time consuming?

    • one year ago
  14. DanielxAK Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Well, you have 5 points. So, you'll end up having 16 coefficients to solve. You're better off solving the equations using a computer program. So, your points will be the x defined above and your five y values will be f(x) for each x. Then, just go back to making cubics on those intervals with unknown coefficients and do all the steps for defining all 16 equations.

    • one year ago
  15. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    A(I) B(I) C(I) D(I) 1.00000000 -0.7573593129 0. -6.627416998 0.7071067812 -2. -4.970562748 6.627416998 6.123233996*10^-17 -3.242640687 4.440892099*10^-16 6.627416998 -0.7071067812 -2. 4.970562748 -6.627416998

    • one year ago
  16. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    ohhhh it didnt work out uughhhhh

    • one year ago
  17. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    whtvrrrr ok once i get the 16 diff values then what?

    • one year ago
  18. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    It seems like I am suppossed to integrate but not sure y we are integrating

    • one year ago
  19. DanielxAK Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Don't worry about integrating right now. You want to find your coefficients first so you can find all 4 cubics. Then, after you know your cubics, you integrate them on their intervals. But, not right now. Worry about finding your coefficients using your equations.

    • one year ago
  20. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    ok I will write out all the equations then

    • one year ago
  21. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    \(S_0(x)=1-.7573593129x-6.627416998x^3\) \(S_1(x)=.707106812-2(x-.25)-4.970562748(x-.25)^2+6.627416998(x-.25)^3\) \(S_2(x)=-3.242640687(x-.5)+6.627416998(x-.5)^3\) \(S_3(x)=-.7071067812-2(x-.75)+4.970562748(x-.75)^2-6.627416998(x-.75)^3\)

    • one year ago
  22. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    So there are my four equations

    • one year ago
  23. DanielxAK Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Have you tried plotting them? If those are correct, they should match f(x) = cos(pi*x) pretty well.

    • one year ago
  24. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    hmm let me try

    • one year ago
  25. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    ummm pretty much sooo

    • one year ago
  26. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Its weird that one of the equations has nothing to do with the graph at all

    • one year ago
  27. DanielxAK Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Yeah, only looks like one or two of them are correct. You may want to double check your equations.

    • one year ago
  28. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    ohhh I found my mistake mixed up signs Its only suppossed to match from [0,1] and it does

    • one year ago
  29. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Thats cooollllllllllllllllllll

    • one year ago
  30. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    its annoying to work with sooooo mannnyy decimals

    • one year ago
  31. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    So now i integrate?

    • one year ago
  32. DanielxAK Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Yes. Now you can integrate using those cubics (so, from 0.25 use S1, 0.25 to 0.5 use S2, etc.).

    • one year ago
  33. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    I am just wondering y we are integrating lol I am just not seeing the logic behind that?

    • one year ago
  34. DanielxAK Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    The idea is you're able to approximate the integral of any function in the real numbers by building a cubic spline and integrating the pieces of the spline.

    • one year ago
  35. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    ohhhhh I get it Ya that makes sense Like I am taking this course online and its def getting annoying wish I had a teacher to explain everything clearly THANKS YOU ARE GREATTTTTTTT

    • one year ago
  36. DanielxAK Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    You're welcome.

    • one year ago
  37. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    @DanielxAK hahah I have one more question It asks me to find f'(.5) How would I go abt it?

    • one year ago
  38. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Do I add all the equations together and that will be my spline function?

    • one year ago
  39. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Heyyyy :)

    • one year ago
  40. DanielxAK Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    It sounds like it's just asking you to find the derivative of f(x) = cos(pi*x) at 0.5.

    • one year ago
  41. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    No it asks me to compare both so it cant mean that

    • one year ago
  42. DanielxAK Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Compare both? Ah okay. So, yes. Find the derivative at 0.5 of the original function. Then, find the derivative of 0.5 using the cubic defined at 0.5 (there should be two of them, since it was one of your points you used when building your piecewise function). The values of both should be pretty close.

    • one year ago
  43. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Ohhh what i did for a previous question gottcchhhaaaaaaa

    • one year ago
  44. swissgirl Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    I am seriously driving u crazy here. Thanks I really appreciate your help

    • one year ago
  45. DanielxAK Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Ha. That's okay.

    • one year ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.