# Nearly constant 0 result from a trig function

• I
• homerwho
In summary, the conversation discusses interpolating a straight line using a trigonometric function, specifically a flat sine function with a very small amplitude on the interval of 0 to 1. The question is raised about the potential use of this function, possibly for counting from 0 to 1 fractionally or in relation to a standing wave on a 0 to 1 domain or range. The question is ultimately answered and the conversation concludes.
homerwho
TL;DR Summary
I was fiddling with the amplitude and frequency to find an approximately flat sine function
Interpolating a straight line with a trigonometric function.

In Matlab I ended up with this expression. fplot(@(x)(.0000001*cos(x*2*pi)+10), [0 1])
Would anyone like to discuss what this could be used in?

#### Attachments

• chart.jpg
30.4 KB · Views: 238
Sorry, what is a "flat sine function"?

berkeman said:
Sorry, what is a "flat sine function"?
the attached image is hard to read but on the interval 0..1 the function lies with in a very very small amplitude. "nearly flat"

 I tend to view equations as shapes. Sorry about the "flat" wording

Last edited:
A different plot showing sine vs cosine with a near zero amplitude and normalized 0..1. Could this be used to count from 0 to 1 fractionally?

#### Attachments

• chart2.jpg
30.3 KB · Views: 230
You just added a constant and a sine function with a small amplitude. Where is the point?
homerwho said:
Could this be used to count from 0 to 1 fractionally?
I'm not sure what you mean by that.

I needed to plot a curve and needed to normalize 0..1. My question has been answered, Thank you. I was thinking of application to standing wave on a 0..1 (domain or range)

Last edited:

## 1. Why am I getting a nearly constant 0 result from a trig function?

There could be several reasons for this. One possibility is that you are using the wrong units for your angle measurement. Trigonometric functions use radians, so if you are inputting degrees, you may get incorrect results. Another possibility is that you are using the wrong function for the problem at hand. Make sure you are using the correct trigonometric function for the type of problem you are trying to solve.

## 2. Can rounding errors cause a nearly constant 0 result from a trig function?

Yes, rounding errors can definitely contribute to a nearly constant 0 result. Trigonometric functions often involve complex calculations and rounding errors can accumulate, leading to a result that appears to be 0. It is important to use precise calculations and round only at the end of your calculations to minimize these errors.

## 3. Is it possible to get a negative result from a trig function that is nearly constant 0?

Yes, it is possible to get a negative result from a trig function that is nearly constant 0. This can occur when the angle being inputted is in the third or fourth quadrant, where the sine and cosine functions are negative. In this case, the result may be close to 0 but still negative.

## 4. Can the amplitude of a trig function affect the result being nearly constant 0?

Yes, the amplitude of a trig function can definitely affect the result being nearly constant 0. The amplitude determines the range of values that the function can output. If the amplitude is too small, the function may appear to be nearly constant 0 because the values it can output are very close to 0.

## 5. How can I troubleshoot a trig function that is giving me a nearly constant 0 result?

If you are getting a nearly constant 0 result from a trig function, there are a few steps you can take to troubleshoot the issue. First, check your units and make sure you are using radians instead of degrees. Next, double check that you are using the correct trigonometric function for the problem at hand. You can also try graphing the function to see if it matches your expectations. If all else fails, it may be helpful to consult a math tutor or teacher for further assistance.

• General Math
Replies
8
Views
1K
• General Math
Replies
5
Views
1K
• General Math
Replies
5
Views
900
• General Math
Replies
3
Views
1K
• General Math
Replies
2
Views
748
• General Math
Replies
5
Views
1K
• General Math
Replies
3
Views
496
• General Math
Replies
4
Views
691
• General Math
Replies
2
Views
1K
• General Math
Replies
14
Views
2K