09-05-2024 10:35 AM
I have very little experience with using LabVIEW and have been given an assignment from my research advisor. That assignment is to use LabVIEW and write a code that sums the terms of the Taylor expansion of e^x but without using any functions.
Any help with this matter would be greatly appreciated.
09-05-2024 10:47 AM
I can guaranteed that you need to use some "functions" (such as add, subtract, multiply, etc.) so your problem as stated cannot be solved. Make sure to ask your teacher exactly what's allowed or not.
If you have little experience with LabVIEW, I would recommend to start with the learning resources listed at the top of the forum and also look at your course notes. I am sure all required tools have been covered.
09-05-2024 10:54 AM
As an example of a Taylor series expansion for sin(x), you could study this post. Now just modify the terms to approximate e^x instead, which is even simpler. See how far you get.
09-05-2024 11:43 AM
I believe the instructor was speaking about built in functions that can be used to expedite the process. An example I can think of is how writing Matlab code can take a significant time when using base functions such as (+,-,*,/) but can be much easier if you have the Symbolic Function Toolbox. I hope I made sense here
09-05-2024 01:09 PM
A Taylor series is always just basic math. The only question would be if you are allowed to use the factorial function, which you really (really!!!) don't need.
09-06-2024 03:34 AM
e^x = 1 + x + x^2 / 2! + x^3 / 3! + … + every x^n / n!
that should be very easy.
09-06-2024 09:08 AM - edited 09-06-2024 09:42 AM
Yes, I already linked to that formula.
One thing to remember is not getting too greedy and try to calculate too many terms. That factorial will blow up relatively quickly. 🙂