how to write a series over one of the variables??
Mostra commenti meno recenti
hi friends. I am writing a code to solve a mathematics problem. I have an expression which includes several variables. I should write the series of this expression over one of the variables and then assign variables using subs function. My code is here:
syms x y L n real
assume(n,'integer');
f=1000; h=0.5;
beta=n*pi/L;
J=h^3/12;
Q=dirac(x)*f;
q1=int(Q*cos(n*pi*x/L),x,-L,L)/L;
sigmax_cosine=-(q1*cos(beta*x)*(2*cosh((beta*(h+2*y))/2)-2*cosh((beta*(3*h-2*y))/2)+2*beta...
sigmax_tot=symsum(sigmax_cosine,n,1,Inf);
I must mention that this series is derived from Fourier series of "Q" and after this series I should assign variables (L,x,y) by subs function. The problem is that it doesn't give me the right answer. and also when I type this:
subs(sigmax_tot,[x y L],[0 0.25 2])
It gives me 3050 but when I type:
subs(sigmax_tot,[x y L],[0 -0.25 2])
The answer is: symprod((500*(16*cosh((pi*n)/2) + 2*pi^2*n^2 - 16))/(pi^2*n^2 - 8*cosh((pi*n)/2) + 8), n, 1, Inf) - 3050
and also I can not plot the sigmax_tot over because it gives me this error: "Undefined function 'symprod' for input arguments of type 'double'." can anyone help me to write the appropriate code for this series??
3 Commenti
Walter Roberson
il 15 Mag 2015
Did your sigmax_cosine get truncated? The line ends in "..." ?
Omidreza Ghafarinejad
il 16 Mag 2015
Walter Roberson
il 16 Mag 2015
I would need the rest of the line in order to investigate further.
Risposte (1)
Walter Roberson
il 15 Mag 2015
0 voti
The limit of (500*(16*cosh((pi*n)/2) + 2*pi^2*n^2 - 16))/(pi^2*n^2 - 8*cosh((pi*n)/2) + 8) as n approaches infinity is -1000, so you are multiplying together an infinite number of non-zero terms so the result would be -infinity
For further examination I would need the full formula.
5 Commenti
Omidreza Ghafarinejad
il 16 Mag 2015
Walter Roberson
il 16 Mag 2015
When I test with that formula using a different symbolic package, I get approximately 7427.234161 for the total with the [0, 1/4, 2] settings, not 3050.
My testing shows that with x=0, L=2, that when y about -.2436338023 or more negative, that the terms become non-negligibly negative so the sum does not converge. That is slightly larger than -1/4 so -1/4 is included: with y=-1/4 the sum does not converge. When -1/4 is substituted in, you can solve() the term over n and demonstrate that the zero crossing is at n = 1/pi, and since the minimum n is 1, all of the components of the sum become strictly negative and not tending to 0.
Omidreza Ghafarinejad
il 16 Mag 2015
Walter Roberson
il 16 Mag 2015
With that definition for sigmax_cosine I can demonstrate that when y = -h/2 and x = 0, the limit of the term as n goes to infinity is -f/L . As that is on the order of -500, the infinite sum is -infinity. I am not getting an infinite product at all.
Walter Roberson
il 16 Mag 2015
Please confirm that the sigmax_cosine term is
-q1 * cos(beta * x) * (2 * cosh(beta * (h + 2 * y) / 2) - 2 * cosh(beta * (3 * h - 2 * y) / 2) + 2 * beta * y * sinh(beta * (h + 2 * y) / 2) + beta * h * sinh(beta * (3 * h - 2 * y) / 2) + 2 * beta * y * sinh(beta * (3 * h - 2 * y) / 2) - 2 * beta ^ 2 * (h ^ 2) * cosh(beta * (h + 2 * y) / 2) + 5 * beta * h * sinh(beta * (h + 2 * y) / 2) + 4 * beta ^ 2 * h * y * cosh(beta * (h + 2 * y) / 2)) / (4 * beta ^ 2 * (h ^ 2) - 2 * cosh(2 * beta * h) + 2)
Categorie
Scopri di più su Mathematics in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!