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

mukushla Group Title

write a mfile with matlab which takes a and n from user and gives the n term s of taylor series of sin(x) around x=a

  • 2 years ago
  • 2 years ago

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

    i have difficulties with math part @experimentX

    • 2 years ago
  2. mukushla Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    we must print something like this\[a_0+a_1(x-a)+a_2(x-a)^2+...\]

    • 2 years ago
  3. mukushla Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    man i have nothing :(

    • 2 years ago
  4. experimentX Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Woops ... !! probably write a function do do that.

    • 2 years ago
  5. experimentX Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    syms x diff(sin(x), 'n times differentiate', 'around a');

    • 2 years ago
  6. mukushla Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    @phi

    • 2 years ago
  7. mukushla Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    man would u mind to join us :)

    • 2 years ago
  8. experimentX Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Woops!! lol

    • 2 years ago
  9. mukushla Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    lol

    • 2 years ago
  10. mukushla Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    nth derivative of sin(x)\[\sin(\frac{n\pi}{2}+x)\]

    • 2 years ago
  11. mukushla Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    wrong !!!

    • 2 years ago
  12. experimentX Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Woops ... i need to differentiate it and substitute it.

    • 2 years ago
  13. experimentX Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    clc syms x center = input('Enter the center of expansion: '); for i=1:10 disp(subs(diff(sin(x), i), x, center)); end

    • 2 years ago
  14. mukushla Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    exper can we show that like what i mentioned above?

    • 2 years ago
  15. mukushla Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    for example with center 3 -0.9900-0.1411(x-3)+0.9900(x-3)^2+...

    • 2 years ago
  16. experimentX Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    hold on ... I'm working.

    • 2 years ago
  17. experimentX Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    I don't like Matlab's string handing !!

    • 2 years ago
  18. mukushla Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    me too

    • 2 years ago
  19. phi Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    This does not do the input. But it does give an idea a=pi/3, n=4; str2=''; for ii=0:(n-1) switch mod(ii,4) case 0, ff= sin(a); case 1, ff= cos(a); case 2, ff= -sin(a); case 3, ff= -cos(a); end; if (ff<0) sg= '-' else sg= '+'; end; if ii>0 str= sprintf('%2s %7.5f(x-%2.4f)^%d',sg, abs(ff)/factorial(ii),a,ii); else str= sprintf('%7.5f',ff); end; str2= [str2 str]; end; str2

    • 2 years ago
  20. phi Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    its output str2 = 0.86603 + 0.50000(x-1.0472)^1 - 0.43301(x-1.0472)^2 - 0.08333(x-1.0472)^3

    • 2 years ago
  21. experimentX Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    I really hate matlab for string manipulation clc syms x center = input('Enter the center of expansion: '); for i=1:3 disp( [subs(diff(sin(x), i), x, center), strcat('(x-', num2str(center), ')^', num2str(i))]); end

    • 2 years ago
  22. experimentX Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    I got this nasty code ... looks pretty close clc syms x center = input('Enter the center of expansion: '); to_out = ''; for i=1:10 to_out = strcat(to_out, '+' , strcat(char(subs(diff(sin(x), i), x, center)), strcat('(x-', num2str(center), ')^', num2str(i)))); end disp(to_out);

    • 2 years ago
  23. experimentX Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    the out put is ...for r=4 ... maybe tweak a little. +cos(3)(x-3)^1+-sin(3)(x-3)^2+-cos(3)(x-3)^3+sin(3)(x-3)^4

    • 2 years ago
  24. mukushla Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    thank u guys

    • 2 years 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.