LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help!

Help me write a program to differentiate the cosine function, using the number of iterations as a variable (input control)

and also another program to integrate the cosine function, using the number of iterations as a variable (input control)

0 Kudos
Message 1 of 5
(678 Views)

Hi,

 


@excelsior77 wrote:

Help me write a program to differentiate the cosine function, using the number of iterations as a variable (input control)

and also another program to integrate the cosine function, using the number of iterations as a variable (input control)


Sure we will help!

 

What have you tried so far?

Where are you stuck?

 

You know this is a public discussion board and not a " solve my homework" service!?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(656 Views)

Since you posted in the LabVIEW forum, can we assume that you are planning do do this in LabVIEW?

 

This seems like a simple homework problem. Show us what you have done so far and explain where you get stuck.

I am not sure why you need two different programs. Both problems can be solved in one.

 

(Also please use a descriptive posts subject. "Need help" is not informative. Almost all posts here need help in some way)

0 Kudos
Message 3 of 5
(653 Views)

@excelsior77 wrote:

Help me write a program to differentiate the cosine function, using the number of iterations as a variable (input control)

and also another program to integrate the cosine function, using the number of iterations as a variable (input control)


Looks like you ask to solve your student's homework...

Well, getting started in easiest way:

cos.png

Message 4 of 5
(651 Views)

Personally, I would keep it very(!!!) simple and start with a Taylor series expansion for sin(x) (see picture), shift it by 90 degrees, then figure the formula for the analytic derivative and integral and go from there. Of course you can also do a numerical derivative(or integral), but that will be less accurate.

 

TaylorSine.png

 

Message 5 of 5
(568 Views)