Items tagged with dsolve dsolve Tagged Items Feed

solarsysem.mw Sorry for the repost but this is my newest document.

I have to create a solar system model on maple by defining a force equation then using the seq function to create a diffeq and then solving those differential equations using the initial conditions with the sun at (0, 0, 0) in xyz coordinates.

It works until my last "ic1" entry and I get an error in dsolve/numeric/process_input

I'm pretty desperate, I'll appreciate any help I can get

 

 

 

 

Dear all,

 

I am trying to solve a differential equation; 

diff(H(z), z) = 6.534101519*10^17*H(z)^2*(1.+z)^(5/2)+6.250000000*10^(-67)*sqrt(-1.639468135*10^119*H(z)^2*(1.+z)^5+9.161095674*10^82*(1.+z)^8+1.092978756*10^168*H(z)^4*(1.+z)^5)

sol := dsolve({test, H(0) = 2.268308490*10^(-18)}, numeric, range = 0 .. 3)

The problem is that it gives me the eror: 

Warning, cannot evaluate the solution further right of .25430145, probably a singularity

How can I get rid of this?

 

 

Dear all

I have the following equaion

Eq := diff(phi(x, k), x, x)+(k^2+2*sech(x))*phi(x, k) = 0;
          
The solution is given by 

phi := (I*k-tanh(x))*exp(I*k*x)/(I*k-1);

My question : At what value of k is there a bound state and in this case can we give a simple form of the solution phi(x,k)

 

With best regards

 

How do I create a function from dsolve() result?

For example, dsolve() outputs:

u(t) = u0ea t

then I would like to create function:

u := t → u0ea t

but I want to do it using dsolve() output, not typing it manually. Thanks.

Dear Maple researchers

 

I have a problem in solving a system of odes that resulted from discretizing, in space variable, method of lines (MOL).

The basic idea of this code is constructed from the following paper:

http://www.sciencedirect.com/science/article/pii/S0096300313008060

If kindly is possible, please tell me whas the solution of this problem.

With kin dregards,

Emran Tohidi.

My codes is here:

> restart;
> with(orthopoly);
print(`output redirected...`); # input placeholder
> N := 4; Digits := 20;
print(`output redirected...`); # input placeholder

> A := -1; B := 1; rho := 3/4;
> g1 := proc (t) options operator, arrow; 1/2+(1/2)*tanh((1/2)*(A-(2*rho-1)*t/sqrt(2))/sqrt(2)) end proc; g2 := proc (t) options operator, arrow; 1/2+(1/2)*tanh((1/2)*(B-(2*rho-1)*t/sqrt(2))/sqrt(2)) end proc;
print(`output redirected...`); # input placeholder
> f := proc (x) options operator, arrow; 1/2+(1/2)*tanh((1/2)*x/sqrt(2)) end proc;
print(`output redirected...`); # input placeholder
> uexact := proc (x, t) options operator, arrow; 1/2+(1/2)*tanh((1/2)*(x-(2*rho-1)*t/sqrt(2))/sqrt(2)) end proc;
print(`output redirected...`); # input placeholder
> basiceq := simplify(diff(uexact(x, t), `$`(t, 1))-(diff(uexact(x, t), `$`(x, 2)))+uexact(x, t)*(1-uexact(x, t))*(rho-uexact(x, t)));
print(`output redirected...`); # input placeholder
                                      0
> alpha := 0; beta := 0; pol := P(N-1, alpha+1, beta+1, x); pol := unapply(pol, x); dpol := simplify(diff(pol(x), x)); dpol := unapply(dpol, x);
print(`output redirected...`); # input placeholder
> nodes := fsolve(P(N-1, alpha+1, beta+1, x));
%;
> xx[0] := -1;
> for i to N-1 do xx[i] := nodes[i] end do;
print(`output redirected...`); # input placeholder
> xx[N] := 1;
> for k from 0 to N do h[k] := 2^(alpha+beta+1)*GAMMA(k+alpha+1)*GAMMA(k+beta+1)/((2*k+alpha+beta+1)*GAMMA(k+1)*GAMMA(k+alpha+beta+1)) end do;
print(`output redirected...`); # input placeholder
> w[0] := 2^(alpha+beta+1)*(beta+1)*GAMMA(beta+1)^2*GAMMA(N)*GAMMA(N+alpha+1)/(GAMMA(N+beta+1)*GAMMA(N+alpha+beta+2));
print(`output redirected...`); # input placeholder
> for jj to N-1 do w[jj] := 2^(alpha+beta+3)*GAMMA(N+alpha+1)*GAMMA(N+beta+1)/((1-xx[jj]^2)^2*dpol(xx[jj])^2*factorial(N-1)*GAMMA(N+alpha+beta+2)) end do;
print(`output redirected...`); # input placeholder
> w[N] := 2^(alpha+beta+1)*(alpha+1)*GAMMA(alpha+1)^2*GAMMA(N)*GAMMA(N+beta+1)/(GAMMA(N+alpha+1)*GAMMA(N+alpha+beta+2));
print(`output redirected...`); # input placeholder
> for j from 0 to N do dpoly1[j] := simplify(diff(P(j, alpha, beta, x), `$`(x, 1))); dpoly1[j] := unapply(dpoly1[j], x); dpoly2[j] := simplify(diff(P(j, alpha, beta, x), `$`(x, 2))); dpoly2[j] := unapply(dpoly2[j], x) end do;
print(`output redirected...`); # input placeholder
print(??); # input placeholder
> for n to N-1 do for i from 0 to N do BB[n, i] := sum(P(jjj, alpha, beta, xx[jjj])*dpoly2[jjj](xx[n])*w[i]/h[jjj], jjj = 0 .. N) end do end do;
> for n to N-1 do d[n] := BB[n, 0]*g1(t)+BB[n, N]*g2(t); d[n] := unapply(d[n], t) end do;
print(`output redirected...`); # input placeholder
> for nn to N-1 do F[nn] := simplify(sum(BB[nn, ii]*u[ii](t), ii = 1 .. N-1)+u[nn](t)*(1-u[nn](t))*(rho-u[nn](t))+d[nn](t)); F[nn] := unapply(F[nn], t) end do;
print(`output redirected...`); # input placeholder
> sys1 := [seq(d*u[q](t)/dt = F[q](t), q = 1 .. N-1)];
print(`output redirected...`); # input placeholder
[d u[1](t)                                                                
[--------- = 40.708333333333333334 u[1](t) + 52.190476190476190476 u[2](t)
[   dt                                                                    

                                                                  2          3
   + 39.958333333333333334 u[3](t) - 1.7500000000000000000 u[1](t)  + u[1](t)

   + 7.3392857142857142858

   - 3.6696428571428571429 tanh(0.35355339059327376220

   + 0.12500000000000000000 t) - 3.6696428571428571429 tanh(
                                                     d u[2](t)   
-0.35355339059327376220 + 0.12500000000000000000 t), --------- =
                                                        dt       
-20.416666666666666667 u[1](t) - 25.916666666666666667 u[2](t)

                                                                  2          3
   - 20.416666666666666667 u[3](t) - 1.7500000000000000000 u[2](t)  + u[2](t)

   - 3.7500000000000000000

   + 1.8750000000000000000 tanh(0.35355339059327376220

   + 0.12500000000000000000 t) + 1.8750000000000000000 tanh(
                                                     d u[3](t)                
-0.35355339059327376220 + 0.12500000000000000000 t), --------- = 29.458333333\
                                                        dt                    

  333333333 u[1](t) + 38.476190476190476190 u[2](t)

                                                                  2          3
   + 30.208333333333333333 u[3](t) - 1.7500000000000000000 u[3](t)  + u[3](t)

   + 5.4107142857142857144

   - 2.7053571428571428572 tanh(0.35355339059327376220

   + 0.12500000000000000000 t) - 2.7053571428571428572 tanh(
                                                   ]
-0.35355339059327376220 + 0.12500000000000000000 t)]
                                                   ]
> ics := seq(u[qq](0) = evalf(f(xx[qq])), qq = 1 .. N-1);
print(`output redirected...`); # input placeholder
    u[1](0) = 0.38629570659055483825, u[2](0) = 0.50000000000000000000,

      u[3](0) = 0.61370429340944516175
> dsolve([sys1, ics], numeic);
%;
Error, (in dsolve) invalid input: `PDEtools/sdsolve` expects its 1st argument, SYS, to be of type {set({`<>`, `=`, algebraic}), list({`<>`, `=`, algebraic})}, but received [[d*u[1](t)/dt = (20354166666666666667/500000000000000000)*u[1](t)+(13047619047619047619/250000000000000000)*u[2](t)+(19979166666666666667/500000000000000000)*u[3](t)-(7/4)*u[1](t)^2+u[1](t)^3+36696428571428571429/5000000000000000000-(36696428571428571429/10000000000000000000)*tanh(1767766952966368811/5000000000000000000+(1/8)*t)-(36696428571428571429/10000000000000000000)*tanh(-1767766952966368811/5000000000000000000+(1/8)*t), d*u[2](t)/dt = -(20416666666666666667/1000000...

I want to solve system of non linear odes numerically.

I encounter following error

Error, (in dsolve/numeric/bvp) cannot determine a suitable initial profile, please specify an approximate initial solution

how to correct it

regards

Hi All, 

 

I'm trying to numerically solve a differential equation which has a numeric function in it. 

For example, consider the function f. 

f:=(r)-> evalf(Int( <some messy function>, <some range>)) ;  <- This can be solved numerically and returns an answer quickly. i.e

f(23) gives 102;

 

Now, I want to numericaly solve something like.

Eq:= diff(p(r),r,r) + diff(p(r),r) - f(p(r));

ICS:=D(p)(0.001)=0, p(0.001) = 3

dsolve({Eq,ICS},numeric).

dsolve will not attempt to solve it due to the numeric integration in f. Is there a way I can just use numeric techniques to solve this kind of problem?

Thanks in advance.  

I have an equation 

eq := diff(y(x), x) = ((76.559-179.54*((1/3600)*x+1)+113.15*((1/3600)*x+1)^2-13.661*((1/3600)*x+1)^3+.4621*((1/3600)*x+1)^4)*.88-.15*((76.559-179.54*((1/3600)*x+1)+113.15*((1/3600)*x+1)^2-13.661*((1/3600)*x+1)^3+.4621*((1/3600)*x+1)^4)*.88)*(1-0.45e-2*(y(x)-9.8-273))-(3.8+2.8*3.7+5.76*10^(-8)*(y(x)^2+(273+9.8+(1/46800)*(18.3-9.8)*x)^2)*(y(x)+273+9.8+(1/46800)*(18.3-9.8)*x))*(273+9.8+(1/46800)*(18.3-9.8)*x-y(x)))/(903*(2702*0.2e-2));

Maple gives me a general solution.

then I  tried to get a particular solution using dsolve({eq, y(0) = 283.8});

But Maple dose not return anything.

Thank you for any help.

woud like to find H(x)

just for one of definition H(x) + H(y) = H(x+y), but it seems require to duplicate one more set of differential system

Error, (in dsolve) found differentiated functions with same name but depending on different arguments in the given DE system: [{a(x), a(y)}, {b(x), b(y)}]

eq2a := a(x)*(diff(c(x), x))+b(x);
eq3a := a(x)*(diff(b(x), x))+c(x)*(diff(b(x), x));
eq4a := a(x)*(diff(c(x), x))+a(x)*(diff(b(x), x))+b(x);
eq2b := a(y)*(diff(c(y), y))+b(y);
eq3b := a(y)*(diff(b(y), y))+c(y)*(diff(b(y), y));
eq4b := a(y)*(diff(c(y), y))+a(y)*(diff(b(y), y))+b(y);
inis := diff(a(x),x)=H(a(x)), diff(b(x),x)=H(b(x)), diff(c(x),x)=H(c(x)), a(1) = b(1), b(1) = c(1), a(0) = b(0), b(0) = c(0);
inis := diff(a(x),x)=H(a(x)), diff(b(x),x)=H(b(x)), diff(c(x),x)=H(c(x));
inio := diff(a(y),y)=H(a(y)), diff(b(y),y)=H(b(y)), diff(c(y),y)=H(c(y)),H(a(x)) + H(b(x)) = H(a(x)+b(x));
sol := dsolve([eq2a=1, eq3a=exp(a), eq4a=0, eq2b=1, eq3b=exp(b), eq4b=0, inis, inio], [a(x), b(x), c(x), a(y), b(y), c(y), H(a(x)), H(b(x)), H(a(y)), H(b(y))]);

I need to receive a plot of the next equation:

E:=0.001;

eq := E*(diff(y(x), `$`(x, 2)))+(x^2+1)*(diff(y(x), x))-x*(x-1/2)^2 = -x^2+2.7^x ;

/*(x=0..1, y(0)=-1, y(1)=0)*/

I try to use DEplot in such way DEplot(eq, y(x), x = 0 .. 1, y = -1 .. 0); but i always get a bug like 

Error, (in DEtools/DEplot) cannot produce plot, non-autonomous DE(s) require initial conditions.

 

Hi,

I am solving a system of differential equations with 2 variables. I can find numerical solution using dsolve with numeric option. I can also plot curves. But I also would like to extract data at time t0 and store into a file. I don't know how to extract numerical values from dsolve and store into a text file at various time, t0, t1, t2 etc. I would like to store data in tabular format with first, sceond and third columns are time, x and y respectively.

 

Just as an example, we can use

x'(t) = y(t), 

y'(t) = 6x(t) - y(t)

with x(0)=1 and y(0) = 2

 

Thanks.

I have an equation eq := diff(y(x), x$3)+3*diff(y(x), x$2)+12*y(x);

dsolve(eq, y(x)); gave me a general solution.

I tried to get a particular solution using dsolve({eq, y(0) = a, y'(0)=0, y"(0) = 0}, y(x));

But I got Error, (in dsolve) not a system with respect to the unknowns [y(x)].

Thank you for any help.

Heather

I'm trying to solve a system of 4 ODE's.

 

 

however I have 4 equations and six unknowns. I dont know how else to describe the functions a,b,c,d

 

cause these just represent vector valued functions at points (x1,y1) and (x2,y2) where i have chosing (x1,y1)=(-1,0) and (x2,y2) = (1,0)

 

I have that

 

dx1/dt = (u,v)

dx2/dt=(f,g)

I know that if i graph these functions I should get vertical lines, but I keep getting circles if I instead consider a(t) to be x(t) and b(t) to be y(t)...

 

I need to solve this system and plot it but i am misinterpreting something somewhere..

i want to solve these two coupled eqaut with finite boundary conditionsions. Can some one help me

eq1:=diff(f(eta),eta,eta,eta,eta)+2*(epsilon/(1+epsilon*theta(eta)))^2*diff(f(eta),eta,eta)*((diff(theta(eta),eta))^2)-(epsilon/(1+epsilon*theta(eta)))*(diff(theta(eta),eta,eta))*(diff(f(eta),eta,eta))=0;

eq2:=diff(theta(eta),eta,eta)+Pr*Re*f(eta)*diff(theta(eta),eta)=0;

Re:=1:Pr:=1:epsilon:=0.25:

bc:=f(1)=0,D(f)(-1)=0,D(f)(1)=1,D(f)(-1)=1,theta(-1)=0,theta(1)=0;

 

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