Reshu Gupta

60 Reputation

4 Badges

5 years, 34 days

MaplePrimes Activity


These are questions asked by Reshu Gupta

Hello

I solved these equations numerically but I need to solve it by Runge-Kutta fourth order Method. Kindly help me in the coding of the same.

 


restart;
N1 :=1:N2 :=1: N3 :=0.1 :R := -1:
EQ:={(1+N1)*diff(f(x),x$4)-N1*diff(g(x),x$2)-R*(-diff(f(x),x)*diff(f(x),x$2)+f(x)*diff(f(x),x$3))=0, N2*diff(g(x),x$2)+N1*(diff(f(x),x$2)-2*g(x))-N3*R*(f(x)*diff(g(x),x)-diff(f(x),x)*g(x))=0}:


IC:={D(D(f))(0)=0, D(f)(1)=0,f(0)=0,f(1)=1,g(0)=0,  g(1)=0}:

sol:= dsolve(EQ union IC, numeric,output=Array([0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1])):
 

[differentiation of f and greek letter xi in bracket]

Hello 

I am having equation y(x) in 5 variable c1, c2, A, R and x.

I am not able to plot graph in x and y(x) for A=1, c1 = 2.3, c2 = 2.4 and R=0,2 5,9.

Range of x: -1..1

Caption :graph of y(x) at different value of R.

Legend: R=0, R=1, R=2, R=3.

my equation is


 

"y(x):=0.0000148809523809523809 A^3 R^2 x^10-0.000334821428571428572 A^3 R^2 x^8+0.00156250000000000000 A^3 R^2 x^7+0.000133928571428571429 A^3 R^2 x^6-0.00312500000000000000 A^2 R^2 x^7+0.00156250000000000000 A^3 R^2 x^5-0.0156250000000000000 A^3 R^2 x^4-0.00312500000000000000 A^2 R^2 x^5-0.00625000000000000000 A^2 R x^6+0.00647321428571428572 A^3 R^2 x^3+0.0625000000000000000 A^2 R^2 x^4-0.0129464285714285714 A^2 R^2 x^3-0.0625000000000000000 A R^2 x^4+0.0625000000000000000 A c1 c2 x^4+0.125000000000000000 A^2 R x^3-0.00319293058132343847 A^3 R^2+0.00803571428571428571 A^2 R x^2-0.250000000000000000 A R x^3+0.0125000000000000000 A^2 R^2-0.00178571428571428571 A^2 R-0.0125000000000000000 A R^2+0.0125000000000000000 A c1 c2-0.750000000000000000 A x^2+0.500000000000000001 (0.0380078849721706865 A^3 R^2-0.150000000000000000 A^2 R^2+0.150000000000000000 A R^2-0.150000000000000000 A c1 c2) x^2+0.750000000000000000 A+1.00000000000000000 (-0.00959821428571428571 A^3 R^2+0.0191964285714285714 A^2 R^2) x+1.00000000000000000 (-0.125000000000000000 A^2 R+0.250000000000000000 A R) x:"

``


 

Download Ques1.mw

restart;
PDEtools[declare](f(x), prime = x);
N := 4;
f(x) :=  sum(p^i*f[i](x), i = 0..N):
HPMEq := (1 - p)*diff(f(x), x $ 3) + p*(diff(f(x), x $ 3) + 1/2*diff(f(x), x, x)*f(x));
for i from 0 to N do
    equ[1][i] := coeff(HPMEq, p, i) = 0;
end do;
cond[1][0] := f[0](0) = 0, D(f[0])(0) = 0, D(f[0])(5) = 1

for j to N do
    cond[1][j] := f[j](0) = 0, D(f[j])(0) = 0, D(f[j])(5) = 0;
end do

for i from 0 to N do
    dsolve({cond[1][i], equ[1][i]}, f[i](x));
    f[i](x) := rhs(%);
end do;
f(x) := evalf(simplify(sum(f[n](x), n = 0 .. N)))

convert(f(x), 'rational')

subs(x = 2.4, diff(f(x), x))

Hello all

could anyone tell how to solve following nonliner equations numerically.

f '''' - c1(g'') + R(f ' f '' - f f ''' )=0

g'' + c2(f '' -2g) -c3(f g' - f ' g)=0

f ' (-1)=0,   f ' (1)=0,   f(-1)=1-A, F(1) =1, g(-1)=0, g(1)=0

c1=3.2, c2=3.3, c3=3.4, R= -10 and A=1.6 are constants.   

please help to find solution  numerically and how to plot. 

Thanks in advence

 

1 2 3 Page 3 of 3