maple2015

145 Reputation

7 Badges

9 years, 297 days

MaplePrimes Activity


These are questions asked by maple2015

Hi

I write a code to read the matrix elements and return information about row and column number of some specific data. This code is lengthy.

Is there a command to give this information directly, without necessity of developing a code?

For instance, assume M=`<|>`(`<,>`(1, 3, 2), `<,>`(4, 1, 3))

I need a command to show that each element how many times is repeated and where is located. For example, the number 3  is repeated 2 times in locations [2,1] and [3,2].

Hi

I have a complex function (i.e. f) with real values for real domain (real amounts of independent variable omega). If the previous calculations are conducted correctly, the minimum positive real root of mentioned function must be equal to 15.4182/sqrt(12). The formula of f is inserted as a plain text.

Formula.txt

The plot of f is depicted as follows:

It seems that the root is between 4 and 5. The command fsolve does not work.

fsolve(simplify(f),omega=4..5)

Also, the Newton iterative method is useless since the imaginary part exists.

f:=simplify(f):

x[1]:=4:

for i while or(i=10, abs(eval(f,omega=x[i]))<1E-3) do

x[i+1]:=x[i]-eval(f,omega=x[i])/eval(diff(f,omega),omega=x[i])

end do:

x[i];

Please propose a way to find first positive real root of above function.

Moreover, I sometimes see discordant results when I use plot command to seek an approximate range for fsolve. I have another function (i.e. f(x)) that fsolve gives the root x=4, which is true but the plot command shows that the root is not occurred at x=4.

 

restart;
Digits := 15: 
L := 1: 
E := 100: 
nu := 0.2:
G := E/2.6: 
h := 0.1: 
b := 0.1: 

s := -E*(diff(w(x), x, x))*sinh(sqrt(2*Pi^2*N*(1+nu)/L^2)*y)/(sqrt(2*Pi^2*N*(1+nu)/L^2)*cosh(sqrt(Pi^2*N*(1+nu)/(2*L^2))*h)): 

t := G*(diff(w(x), x))*(1-cosh(sqrt(2*Pi^2*N*(1+nu)/L^2)*y)/cosh(sqrt(Pi^2*N*(1+nu)/(2*L^2))*h)):

integrand := b*(int(t^2/(2*G)+s^2/(2*E), y = -(1/2)*h .. (1/2)*h))-(1/2)*E*b*h^3*evalf(Pi^2)*N*(diff(w(x), x))^2/(12*L^2): 

integrand := subs(diff(w(x), x, x) = S, diff(w(x), x) = F, w(x) = Z, integrand): 


EQ := subs(S = diff(w(x), x, x), F = diff(w(x), x), Z = w(x), diff(integrand, Z))-(diff(subs(S = diff(w(x), x, x), F = diff(w(x), x), Z = w(x), diff(integrand, F)), x))+diff(subs(S = diff(w(x), x, x), F = diff(w(x), x), Z = w(x), diff(integrand, S)), x, x): 


W := rhs(dsolve(EQ)):


u1 := (int((E*sinh(sqrt(2*Pi^2*N*(1+nu)/L^2)*y)/(sqrt(2*Pi^2*N*(1+nu)/L^2)*cosh(sqrt(Pi^2*N*(1+nu)/(2*L^2))*h)))^2, y = -(1/2)*h .. (1/2)*h))*(int((diff(W, x, x))^2, x = 0 .. L))/(2*E):

u2 := (int(G^2*(1-cosh(sqrt(2*Pi^2*N*(1+nu)/L^2)*y)/cosh(sqrt(Pi^2*N*(1+nu)/(2*L^2))*h))^2, y = -(1/2)*h .. (1/2)*h))*(int((diff(W, x))^2, x = 0 .. L))/(2*G):

U := simplify(u1+u2-(1/2)*E*b*h^3*evalf(Pi^2)*N*(int((diff(W, x))^2, x = 0 .. L))/(12*L^2))

 

It seems that solving of the above integration is a very time consuming process.

Please propose a way to solve above integration, if it is possible.

Thanks

Hi

I need to express some discrete functions with domain in the natural numbers.

Is there a command like the 'AllSolutions' which is used for int?

As an example, how we can express all possible values of first derivative of chebyshev polynomial for various orders in terms of a piecewise function at origin ?

The following commands do not return a suitable answer, in this case!

f:=diff(ChebyshevT(n, r), r):

g:=simplify(eval(f, r = 0), symbolic) assuming(n::integer);

`assuming`([convert(g, piecewise, n)], [n::integer]);

Hi

Assume a linear second order ode with constant coefficients as follows:

M*u''+C*u'+K*u=0

where the symbol (') denotes derivative with respect to time and M, C and K are positive real constants.

The initial conditions are u(0)=u0 and u'(0)=u'0.

Substituting u=exp(a*t) in the ODE to calculate characteristic equation, one has

M*a^2+C*a+K=0  ---> If 0<C<2sqrt(M*K) then u=exp(-C/(2M)*t)*(c1*sin(w*t)+c2*cos(W*t))

in which c1 and c2 can be obtained from initial conditions and W=sqrt(C^2-4*M*K)/2M.

For the case that C is imaginary number, assuming C=i*c yields

{a1,a2} ={ -(c/(2M) +sqrt(c^2+4*M*K)/2M)*i,(-c/(2M) +sqrt(c^2+4*M*K)/2M)*i }

where i is one of the square roots of -1.

Is it true to write u=c1*(sin(a1*t)+cos(a1*t))+c2*(sin(a2*t)+cos(a2*t)) ?

I solve two examples by Maple,

dsolve({diff(u(t), t, t)+0.1*(diff(u(t), t))+2*u(t)} union {u(0) = 1, (D(u))(0) =0.1});

dsolve({diff(u(t), t, t)+0.1*I*(diff(u(t), t))+2*u(t)} union {u(0) = 1, (D(u))(0) = 0.1});

Second example gives complex answer. Is it possible to get trigonometric answer with real constants c1 and c2?

1 2 3 4 5 6 7 Last Page 3 of 12