Group Abstract Group Abstract

Message Boards Message Boards

0
|
4.7K Views
|
3 Replies
|
1 Total Like
View groups...
Share
Share this post:

Why am I not seeing the plot

Posted 10 years ago
eqns = {Derivative[4][f][y] - 2 Derivative[2][f][y] a^2 + 
     a^2 (-r y + a^2) f[y] == 0,y=0, f[y] == 0,
   Derivative[3][f][y] - Derivative[1][f][y] a^2 == 0,
   Derivative[1][f][y] == 1,
   Derivative[2][f][y] == \[Gamma]};

sol[r_?NumericQ, \[Gamma]_?NumericQ] :=
  NDSolve[eqns, {f}, {y, 0, 100}, Method -> "BDF",
   MaxSteps -> Infinity, InterpolationOrder -> All,
   WorkingPrecision -> 30];
Off[ReplaceAll::reps];
a = 5;

Plot[Evaluate[{y = 1, f[y] = 0, f''[y] = 0} /. sol], {y, 0, 50}]

I have to find the plot of (r,a).

POSTED BY: jack hold
3 Replies
Posted 10 years ago

Okay, I'm making a few guesses here, but I think you want something like the following for your equations.

eqns[a_, R_, \[Gamma]_] :=
 {
  f''''[y] - 2 a^(2)*f''[y] + a^(2)*(a^(2) - R*y) f[y] == 0,
  f'''[0] - a^(2) f'[0] == 0,
  f''[0] == \[Gamma],
  f'[0] == 1,
  f[0] == 0
  }

I made it a function so you could easily replace the values of a, R, and [Gamma] as desired. This system of equations can be solved with NDSolve if you provide values for a, R, and [Gamma]. Extract the function from the output of NDSolve, and plot that.

POSTED BY: Eric Rimbey
Posted 10 years ago
  • I see you have Off[ReplaceAll::reps] in there, which suggests you encountered errors previously, but rather than fix them you just suppressed the messages.
  • ReplaceAll, /., expects a list of replacement rules, which sol is not.
  • Evaluate seems unnecessary here.
  • The arguments in the definition of sol are not the typical pattern expressions one expects in SetDelayed.
  • [Gamma] in particular is problematic. Perhaps you intended \[Gamma].
  • eqns includes y=0, which you may have intended to by y==0
  • You explicitly set a=5, so I'm not sure what you even expect "plot of (r,a)" to show.

If it's still not working after you fix all of these things, maybe you can provide some context or describe what you're trying to do and what you expect to see.

POSTED BY: Eric Rimbey
Posted 10 years ago

Then sir, i have this equation

f''''[y]-2a^(2)f''[y]+a^(2)*(a^(2)-Ry)f(y)=0 with y=0 -> f[y]=0,f'''-a^(2)f'[y]=0,f'[y]=1,f''[y]=gamma

'a' i fixed value ,could be (0,1,2,3...)

i have to resolve this equation and find the plot of (a,R) with this condition y=1 -> f[y]=0,f''[y]=0

Thanks and sorry for my bad english :/

POSTED BY: jack hold
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard