arashghgood

60 Reputation

2 Badges

3 years, 170 days

MaplePrimes Activity


These are questions asked by arashghgood

hi Maplers
I want to solve the following differential equation numerically. but i get error

restart;
eqn := (diff(H(K),K))^3+4*K^4*H(K)^4*diff(H(K),K)+8*K^4*H(K)^5=0;
ics := H(0)=1/2;
sol := dsolve({eqn,ics},numeric);
Error, (in DEtools/convertsys) unable to convert to an explicit first-order system

dear all
I would like to solve the following differential equation in Maple Numerically.

restart;
pde := I*10*diff(u(k, t), t) + (diff(u(k, t), t, t)) -16* u(k, t) = 0;
ics := u(k, 0) = sqrt(Pi/2)*csch(Pi/2*k), (D[2](u))(k, 0) = -(1/4)*sqrt(2)*Pi^(3/2)*csch((1/2)*Pi*k)*coth((1/2)*Pi*k)
bcs := u(0, t) = 0, u(100, t) = 0;
sol := pdsolve(pde, {ics, bcs}, numeric, range = 0 .. 1, output = listprocedure);
sol;

here the sech(x)^2 in real space and corresponding fourier transformaation is the initial condition

the Gaussian function as initial condition is also an alternative.

How can I solve it?

Dear all,

consider two lists of complex values :

list1 := [l1,l2,l3,l4,l5]

list2 := [s1,s2,s3,s4,s5].

There is a set of second order differential equation

d^2u(k)/dt^2+I*A*du/dt-B*u=0

where A is sum of elements of list1 and list2 and B is multiplication of their element. Therefore,

d^2u[1](k)/dt^2+I*(l1+s1)*du[1]/dt-(l1*s1)*u[1]=0

d^2u[2](k)/dt^2+I*(l2+s2)*du[2]/dt-(l2*s2)*u[2]=0

d^2u[3](k)/dt^2+I*(l3+s3)*du[3]/dt-(l3*s3)*u[3]=0

d^2u[4](k)/dt^2+I*(l4+s4)*du[4]/dt-(l4*s4)*u[4]=0

d^2u[5](k)/dt^2+I*(l5+s5)*du[5]/dt-(l5*s5)*u[5]=0

How can I create a set of differential equations and initial conditions based on nops(list1), then solve this system of differential equations numerically in Maple.

since u[i] are function of k, next step is to transforme them to real space by inverse fourier transform.

finally save the results and plot them.

Note that for simplisity I wrote a linear equation but it is not. so, because of nonlinear terms it is not possible to use superposition of the solution. I have to take them as coupled system of equations.

====

for example

list1 := [ [0., -5.496799068*10^(-15)-0.*I], [.1, 5.201897725*10^(-16)-1.188994754*I], [.2, 6.924043163*10^(-17)-4.747763855*I], [.3, 2.297497722*10^(-17)-10.66272177*I], [.4, 1.159126178*10^(-17)-18.96299588*I] ] 

list2 :=[ [0., -8.634351786*10^(-7)-67.81404036*I], [.1, -0.7387644021e-5-67.76491234*I], [.2, -0.1433025271e-4-67.59922295*I], [.3, -0.2231598645e-4-67.25152449*I], [.4, -0.3280855430e-4-66.56357035*I] ]

where first element is k and the second value is l_i and s_i

the differential equation is

ode_u[i]:= diff(u[i](t),t$2)+I*(list1[i][2]+list2[i][2])*diff(u[i](t),t)-list1[1][2]*list2[2][2]*u[i](t)=0;

eta is in fourier space where k values are in list1[i][1].

We laso know that f(-k)= - f*(k) where f=list[i][2]

and u[i] as function of k, initially has a Gaussian shape at t=0 in fourier space..

Thanks in advance for your help

Dear Maplers

Consider the follwoing differential equation

Deq:=(K*( Q*sinh(K)*cosh(Q)-K*cosh(K)*sinh(Q))*(1+s*K^2)
   +p*(-4*K^2*Q*(K^2+Q^2)
       +Q*(Q^4+2*K^2*Q^2+5*K^4)*cosh(K)*cosh(Q)
       -K*(Q^4+6*K^2*Q^2+K^4)*sinh(K)*sinh(Q)));

pp := 0.077;
ss := 0; 

ode:= diff(Q(K), K) = eval(subs(Q=Q(K),-(diff(Deq, K))/(diff(Deq, Q))),[p=pp,s=ss]);

I aim to solve this DE numerically. Note that K and Q are complex variable and K varies from 0.1.e-5*I to 20.+1.e-5*I

in addition,

Q(0)=1e-10+1e-10*I

I tried dsolve. but it does not get back correct solutions

sol1 := dsolve({ode,Q(0)=1e-15+1e-15*I}, numeric, method=rkf45, output = listprocedure, abserr = 1.*10^(-6), relerr = 1.*10^(-6), range=0.0+1e-5*I .. 10.0+1e-5*I )

for example sol1(2.0+1e-5*I) return nothing

How can I solve this equation?

Dear Mapler

I want to find all real and complex solutions to the following equation. then calculate the omega based on these values and finally select the present the omega with the smallest imaginary part.

with(SignalProcessing):

n:=8;

kk:=FFT(GenerateJaehne(n,1));

#params:= [p,    s, nu,   rho, h,    sigma, C1[1], C1[2], C2[1], C2[2], k1,  k2,  m1[1], m1[2], m2[1], m2[2] ]
 params:= [1e-7, 0, 1e-6, 1e3, 1e-2, 0,     5e-4,  5e-4,  5e-4,  5e-4,  1.4, 1.4, 1+I,   1+I,   1-I,   1-I   ]:

for i from 1 to n do
    x:=kk[i]:
    mm[i]:=[solve(
             eval(
                  ( (x*h)*( (y*h)*sinh((x*h))*cosh((y*h))-(x*h)*cosh((x*h))*sinh((y*h)))*(1+s*(x*h)^2)
                    +p*(-4*(x*h)^2*(y*h)*((x*h)^2+(y*h)^2)+(y*h)*((y*h)^4+2*(x*h)^2*(y*h)^2+5*(x*h)^4)*cosh((x*h))*cosh((y*h))
                    -(x*h)*((y*h)^4+6*(x*h)^2*(y*h)^2+(x*h)^4)*sinh((x*h))*sinh((y*h))))
                  /((x*h)^2*(y*h)*cosh((y*h)))
                 , [p=params[1], s=params[2], h=params[5] ]), y
            , AllSolutions=true)]:
    print(kk[i]);
    print(mm[i]);
    for j from 1 to nops(mm[i]) do
        omega[i][j]:=eval(-I*nu*((x*h)^2-mm[i][j]^2), [nu=params[3],h=params[5]]);
        print(omega[i][j]);
    od:
    print(`======`);
od:
1 2 3 Page 1 of 3