how to write a series over one of the variables??
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Walter Roberson
le 15 Mai 2015
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 commentaires
Walter Roberson
le 16 Mai 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
le 16 Mai 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)
Voir également
Catégories
En savoir plus sur Calculus dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!