Have you tried this leaving in the exp and/or sin? Is there any reason that you can't just use zero? And have you checked that your summation has converged after 1,000 terms? Or does it converge much sooner or not at all? You need to make sure that you're using enough Taylor expansion terms an that they are accurate for the domain. I can't really comment on the particular problem you're trying to solve. Have you plotted the the actual function to get a rough approximation for where the zero is? The question is if the time makes any sense due to the approximations that you're making.
You shouldn't be surprised to see imaginary roots provided that at least one root is real and positive, corresponding to your time. Doing just this, I made a for loop to generate terms just as the summation function would-as you can see, I used 1000 terms.ĭoes what I am doing seem wrong to anyone? If there is a better method, could someone please recommend it? As far as I know, the easiest way to do this would be to use the Taylor expansion of the exponential function, using only the first few terms, because I expect the equilibrium time to be relatively short and then use the small angle approximation for the sine function, because the rod has a relatively small length. What I would like to do is find the time at which the one-dimensional object equilibrates with the environment, which is held at a constant temperature of T=0. The temperature distribution, that satisfies the prescribed boundary and initial conditions, is given on page 50, I believe. In the given link is the heat equation solved for a particular one-dimensional case. Here is a little background as to what I am trying to do: I expected a real number, because I am trying to calculate a time. The problem that I get is that S is an a vector which contains imaginary numbers. I have a symbolic function, whose zeros I am particular interested in knowing.