如何在Mathematica中绘制图表?

时间:2014-01-18 11:13:45

标签: plot wolfram-mathematica

DSolve[{Derivative[2][Subscript[u, 00]][y] + 
     Rey*S*Derivative[1][Subscript[u, 00]][y] == -Rey*
     Gr*((E^(Pr Rey S - Pr Rey S y) (-1 + E^(Pr Rey S y)))/(-1 + E^(
       Pr Re S))), 
   Subscript[u, 00][0] == h*Derivative[1][Subscript[u, 00]][0], 
   Subscript[u, 00][1] == 1}, Subscript[u, 00][y], y] // FullSimplify

输出是:

{{Subscript[u, 0][
    y] -> (E^(-Rey S (Pr (-1 + y) + y)) (-E^(Rey S y) Gr - 
        E^(S (Rey + Pr (Re + Rey (-1 + y)))) (-1 + Pr) Pr Rey S^2 + 
        E^(Rey S (1 + y)) Gr (1 + h Rey S) + 
        E^(S (Pr Re + Rey + Pr Rey (-1 + y) + Rey y)) (-1 + 
           Pr) Pr Rey S^2 (1 + h Rey S) - 
        E^(Rey S (1 + Pr y)) Gr (1 + Pr (-1 + Pr + h Pr) Rey S) + 
        E^(Rey S (1 + Pr (-1 + y))) (Gr + (-1 + Pr) Pr Rey S^2) - 
        E^(Rey S (1 + Pr (-1 + y) + y)) (1 + 
           h Rey S) (Gr + (-1 + Pr) Pr Rey S^2) - 
        E^(Rey S (1 + y + Pr y))
          Gr (-1 + Pr) Pr Rey S (1 + h Rey S) (-1 + y) + 
        E^((1 + Pr) Rey S y)
          Gr (1 + Pr Rey S (h Pr + (-1 + Pr) y))))/((-1 + E^(
        Pr Re S)) (-1 + Pr) Pr Rey S^2 (-1 + 
        E^(Rey S) (1 + h Rey S)))}}

从输出中,当我尝试绘制函数u_00时,Mathematica中的图是空的。

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

In[1]:= Rey = 2; S = 3; Gr = 4; Pr = 5; ReNoNoNo = 6; (*NOT Re *) h = 7;
sol = Subscript[u, 0][y] /. DSolve[{Derivative[2][Subscript[u, 00]][y] + 
   Rey*S*Derivative[1][Subscript[u, 00]][y] == -Rey*Gr*((E^(Pr Rey S -
   Pr Rey S y) (-1 + E^(Pr Rey S y)))/(-1 + E^(Pr ReNoNoNo S))), 
   Subscript[u, 00][0] == h*Derivative[1][Subscript[u, 00]][0], 
   Subscript[u, 00][1] == 1}, Subscript[u, 00][y], y][[1, 1]];
Plot[sol, {y, 0, 1}]

Out[2]= ...PlotSnipped...